diff --git a/application/config/version.php b/application/config/version.php index 20adf3ad096..a43cfb24369 100644 --- a/application/config/version.php +++ b/application/config/version.php @@ -13,7 +13,7 @@ */ $config['versionnumber'] = "2.05b4"; -$config['dbversionnumber'] = 169; +$config['dbversionnumber'] = 170; $config['buildnumber'] = ''; $config['updatable'] = true; diff --git a/application/helpers/update/updatedb_helper.php b/application/helpers/update/updatedb_helper.php index 922a5d64542..cec318e8dea 100644 --- a/application/helpers/update/updatedb_helper.php +++ b/application/helpers/update/updatedb_helper.php @@ -1124,10 +1124,15 @@ function db_upgrade_all($oldversion) { // Remove old column. Yii::app()->getDb()->createCommand()->dropColumn('{{surveys}}', 'allowjumps'); $db->createCommand()->update('{{settings_global}}',array('stg_value'=>169),"stg_name='DBVersion'"); - } - + if ($oldversion < 170) + { + // renamed advanced attributes fields dropdown_dates_year_min/max + $db->createCommand()->update('{{question_attributes}}',array('attribute'=>'date_min'),"attribute='dropdown_dates_year_min'"); + $db->createCommand()->update('{{question_attributes}}',array('attribute'=>'date_max'),"attribute='dropdown_dates_year_max'"); + $db->createCommand()->update('{{settings_global}}',array('stg_value'=>170),"stg_name='DBVersion'"); + } $oTransaction->commit(); } catch(Exception $e) diff --git a/installer/sql/create-mssql.sql b/installer/sql/create-mssql.sql index 94fe9fb9938..e1bfd758a6b 100644 --- a/installer/sql/create-mssql.sql +++ b/installer/sql/create-mssql.sql @@ -575,4 +575,4 @@ create unique index [permissions_idx2] ON [lime_permissions] ([entity_id], [enti -- -- Version Info -- -INSERT INTO [prefix_settings_global] VALUES ('DBVersion', '169'); \ No newline at end of file +INSERT INTO [prefix_settings_global] VALUES ('DBVersion', '170'); \ No newline at end of file diff --git a/installer/sql/create-mysql.sql b/installer/sql/create-mysql.sql index 66b8b6fdeb0..b0185e47890 100644 --- a/installer/sql/create-mysql.sql +++ b/installer/sql/create-mysql.sql @@ -581,4 +581,4 @@ create index `parent_qid_idx` on `prefix_questions` (`parent_qid`); -- -- Version Info -- -INSERT INTO `prefix_settings_global` VALUES ('DBVersion', '169'); +INSERT INTO `prefix_settings_global` VALUES ('DBVersion', '170'); diff --git a/installer/sql/create-pgsql.sql b/installer/sql/create-pgsql.sql index 22e7135590f..240b67be5e3 100644 --- a/installer/sql/create-pgsql.sql +++ b/installer/sql/create-pgsql.sql @@ -585,4 +585,4 @@ create unique index permissions_idx2 ON lime_permissions (entity_id, entity_name -- -- Version Info -- -INSERT INTO prefix_settings_global VALUES ('DBVersion', '169'); +INSERT INTO prefix_settings_global VALUES ('DBVersion', '170');