Whoops! Fixed one tiny upgrade thing ... this will make choices

with "publish" turned off upgrade predictably
This commit is contained in:
moodler
2004-07-01 13:30:50 +00:00
parent c1f1664dd3
commit eeb2d76ee8
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -38,6 +38,7 @@ function choice_upgrade($oldversion) {
table_column("choice", "", "allowupdate", "integer", "2", "unsigned", "0", "", "release");
}
if ($oldversion < 2004070102) {
modify_database("", "UPDATE prefix_choice SET allowupdate = '1' WHERE publish = 0;");
modify_database("", "UPDATE prefix_choice SET release = '1' WHERE publish > 0;");
modify_database("", "UPDATE prefix_choice SET publish = publish - 1 WHERE publish > 0;");
}
+1
View File
@@ -24,6 +24,7 @@ function choice_upgrade($oldversion) {
table_column("choice", "", "allowupdate", "integer", "2", "unsigned", "0", "", "release");
}
if ($oldversion < 2004070102) {
modify_database("", "UPDATE prefix_choice SET allowupdate = '1' WHERE publish = 0;");
modify_database("", "UPDATE prefix_choice SET release = '1' WHERE publish > 0;");
modify_database("", "UPDATE prefix_choice SET publish = publish - 1 WHERE publish > 0;");
}