aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortravis%sedsystems.ca <>2005-02-25 07:27:08 +0000
committertravis%sedsystems.ca <>2005-02-25 07:27:08 +0000
commit32882b6e3513fa69185ea5b3d115e70b69ea5362 (patch)
tree83ef4cb82cf079f265ee2ae63f9ec356bf86701a
parentb8a8680e9d5ed7de541ab9f4e0275fa79a9a6d30 (diff)
downloadbugs-32882b6e3513fa69185ea5b3d115e70b69ea5362.tar
bugs-32882b6e3513fa69185ea5b3d115e70b69ea5362.tar.gz
bugs-32882b6e3513fa69185ea5b3d115e70b69ea5362.tar.bz2
bugs-32882b6e3513fa69185ea5b3d115e70b69ea5362.tar.xz
bugs-32882b6e3513fa69185ea5b3d115e70b69ea5362.zip
Bug 277504 : quips migrated from quip file have an (invalid) userid of 0
Patch by Frederic Buclin <LpSolit@gmail.com> r=mkanat a=myk
-rwxr-xr-xchecksetup.pl13
1 files changed, 12 insertions, 1 deletions
diff --git a/checksetup.pl b/checksetup.pl
index cd734a54a..8ef983d7b 100755
--- a/checksetup.pl
+++ b/checksetup.pl
@@ -1992,10 +1992,11 @@ $table{bug_group_map} =
index(group_id)';
# 2002-07-19, davef@tetsubo.com, bug 67950:
+# 2005-02-20, LpSolit@gmail.com, bug 277504
# Store quips in the db.
$table{quips} =
'quipid mediumint not null auto_increment primary key,
- userid mediumint not null default 0,
+ userid mediumint null,
quip text not null,
approved tinyint(1) not null default 1';
@@ -4263,6 +4264,16 @@ ChangeFieldType ('bugs', 'bug_severity', 'varchar(64) not null');
ChangeFieldType ('bugs', 'rep_platform', 'varchar(64) not null');
ChangeFieldType ('bugs', 'op_sys', 'varchar(64) not null');
+
+# 2005-02-20 - LpSolit@gmail.com - Bug 277504
+# When migrating quips from the '$datadir/comments' file to the DB,
+# the user ID should be NULL instead of 0 (which is an invalid user ID).
+if (!GetFieldDef('quips', 'userid')->[2]) {
+ ChangeFieldType('quips', 'userid', 'mediumint null');
+ print "Changing owner to NULL for quips where the owner is unknown...\n";
+ $dbh->do('UPDATE quips SET userid = NULL WHERE userid = 0');
+}
+
# If you had to change the --TABLE-- definition in any way, then add your
# differential change code *** A B O V E *** this comment.
#