[Rt-commit] [svn] r1948 - in rt/branches/3.3-TESTING: .
etc/upgrade/3.3.11 sbin
jesse at pallas.eruditorum.org
jesse at pallas.eruditorum.org
Mon Nov 29 01:24:53 EST 2004
Author: jesse
Date: Mon Nov 29 01:24:52 2004
New Revision: 1948
Modified:
rt/branches/3.3-TESTING/ (props changed)
rt/branches/3.3-TESTING/etc/upgrade/3.3.11/schema.Pg
rt/branches/3.3-TESTING/etc/upgrade/3.3.11/schema.mysql
rt/branches/3.3-TESTING/sbin/rt-setup-database.in
Log:
r9435 at tinbook: jesse | 2004-11-29T06:26:08.317066Z
More postgres upgrade fixes
Modified: rt/branches/3.3-TESTING/etc/upgrade/3.3.11/schema.Pg
==============================================================================
--- rt/branches/3.3-TESTING/etc/upgrade/3.3.11/schema.Pg (original)
+++ rt/branches/3.3-TESTING/etc/upgrade/3.3.11/schema.Pg Mon Nov 29 01:24:52 2004
@@ -1,13 +1,11 @@
-START TRANSACTION;
-
ALTER TABLE ObjectCustomFieldValues ADD COLUMN SortOrder INTEGER;
+UPDATE ObjectCustomFieldValues SET SortOrder = 0;
ALTER TABLE ObjectCustomFieldValues ALTER COLUMN SortOrder SET DEFAULT 0;
ALTER TABLE ObjectCustomFieldValues ALTER COLUMN SortOrder SET NOT NULL;
ALTER TABLE ObjectCustomFieldValues ADD COLUMN Disabled INTEGER;
+UPDATE ObjectCustomFieldValues SET Disabled = 1 WHERE Current = 0;
+UPDATE ObjectCustomFieldValues SET Disabled = 0 WHERE Current != 0;
ALTER TABLE ObjectCustomFieldValues ALTER COLUMN Disabled SET DEFAULT 0;
ALTER TABLE ObjectCustomFieldValues ALTER COLUMN Disabled SET NOT NULL;
-UPDATE ObjectCustomFieldValues SET Disabled = 1 WHERE Current = 0;
ALTER TABLE ObjectCustomFieldValues DROP COLUMN Current;
-
-COMMIT;
Modified: rt/branches/3.3-TESTING/etc/upgrade/3.3.11/schema.mysql
==============================================================================
--- rt/branches/3.3-TESTING/etc/upgrade/3.3.11/schema.mysql (original)
+++ rt/branches/3.3-TESTING/etc/upgrade/3.3.11/schema.mysql Mon Nov 29 01:24:52 2004
@@ -1,9 +1,5 @@
-START TRANSACTION;
-
ALTER TABLE ObjectCustomFieldValues ADD COLUMN SortOrder INTEGER NOT NULL DEFAULT 0;
ALTER TABLE ObjectCustomFieldValues ADD COLUMN Disabled int2 NOT NULL DEFAULT 0;
UPDATE ObjectCustomFieldValues SET Disabled = 1 WHERE Current = 0;
ALTER TABLE ObjectCustomFieldValues DROP COLUMN Current;
-
-COMMIT;
Modified: rt/branches/3.3-TESTING/sbin/rt-setup-database.in
==============================================================================
--- rt/branches/3.3-TESTING/sbin/rt-setup-database.in (original)
+++ rt/branches/3.3-TESTING/sbin/rt-setup-database.in Mon Nov 29 01:24:52 2004
@@ -196,6 +196,7 @@
local $SIG{__WARN__} = sub {};
my $is_local = 0; # local/etc/schema needs to be nonfatal.
+ $dbh->begin_work or die $dbh->errstr;
foreach my $statement (@schema) {
if ($statement =~ /^\s*;$/) { $is_local = 1; next; }
print STDERR "SQL: $statement\n" if defined $args{'debug'};
@@ -204,6 +205,7 @@
die "Problem with statement:\n $statement\n" . $sth->errstr;
}
}
+ $dbh->commit or die $dbh->errstr;
}
else {
More information about the Rt-commit
mailing list