Skip to content

Commit

Permalink
Fixed issue: If question attributes were set to invalid (but working)…
Browse files Browse the repository at this point in the history
… True/False values they will be converted to 1/0 now on upgrade from a 1.86 or earlier.

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey@8239 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
c-schmitz committed Jan 10, 2010
1 parent 38d5658 commit a50eed8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions admin/update/upgrade-mssql.php
Expand Up @@ -353,6 +353,8 @@ function db_upgrade($oldversion) {
{
modify_database("", "ALTER TABLE [prefix_surveys] ALTER COLUMN [startdate] datetime NULL"); echo $modifyoutput; flush();
modify_database("", "ALTER TABLE [prefix_surveys] ALTER COLUMN [expires] datetime NULL"); echo $modifyoutput; flush();
modify_database("", "UPDATE [prefix_question_attributes] SET [value]='0' WHERE [value]='false'"); echo $modifyoutput; flush();
modify_database("", "UPDATE [prefix_question_attributes] SET [value]='1' WHERE [value]='true'"); echo $modifyoutput; flush();
modify_database("", "UPDATE [prefix_settings_global] SET [stg_value]='142' WHERE stg_name='DBVersion'"); echo $modifyoutput; flush();
}
echo '<br /><br />Database update finished ('.date('Y-m-d H:i:s').')<br />';
Expand Down
2 changes: 2 additions & 0 deletions admin/update/upgrade-mysql.php
Expand Up @@ -340,6 +340,8 @@ function db_upgrade($oldversion) {
{
modify_database("","ALTER TABLE `prefix_surveys` CHANGE `expires` `expires` datetime"); echo $modifyoutput; flush();
modify_database("","ALTER TABLE `prefix_surveys` CHANGE `startdate` `startdate` datetime"); echo $modifyoutput; flush();
modify_database("", "UPDATE `prefix_question_attributes` SET `value`='0' WHERE value='false'"); echo $modifyoutput; flush();
modify_database("", "UPDATE `prefix_question_attributes` SET `value`='1' WHERE value='true'"); echo $modifyoutput; flush();
modify_database("", "UPDATE `prefix_settings_global` SET `stg_value`='142' WHERE stg_name='DBVersion'"); echo $modifyoutput; flush();
}

Expand Down
2 changes: 2 additions & 0 deletions admin/update/upgrade-postgres.php
Expand Up @@ -181,6 +181,8 @@ function db_upgrade($oldversion) {
{
modify_database("", "ALTER TABLE prefix_surveys ALTER COLUMN \"startdate\" timestamp"); echo $modifyoutput; flush();
modify_database("", "ALTER TABLE prefix_surveys ALTER COLUMN \"expires\" timestamp"); echo $modifyoutput; flush();
modify_database("", "UPDATE prefix_question_attributes SET value='0' WHERE value='false'"); echo $modifyoutput; flush();
modify_database("", "UPDATE prefix_question_attributes SET value='1' WHERE value='true'"); echo $modifyoutput; flush();
modify_database("", "UPDATE prefix_settings_global SET stg_value='142' WHERE stg_name='DBVersion'"); echo $modifyoutput; flush();
}

Expand Down

0 comments on commit a50eed8

Please sign in to comment.