Browse Source

[svn r17924] Fixing the 1.8.4 to 1.8.5 migration script to avoid problems when upgrading from lower versions directly to 1.8.6 (which will go through each sub-migration process)

Yannick Warnier 16 years ago
parent
commit
4a2a788afb
1 changed files with 2 additions and 0 deletions
  1. 2 0
      main/install/migrate-db-1.8.4-1.8.5-pre.sql

+ 2 - 0
main/install/migrate-db-1.8.4-1.8.5-pre.sql

@@ -12,6 +12,8 @@
 --
 -- This first part is for the main database
 -- xxMAINxx
+ALTER TABLE settings_current ADD UNIQUE unique_setting (variable,subkey,category);
+ALTER TABLE settings_options ADD UNIQUE unique_setting_option (variable,value);
 INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext) VALUES ('extendedprofile_registration', 'mycomptetences', 'checkbox', 'User', 'false', 'ExtendedProfileRegistrationTitle', 'ExtendedProfileRegistrationComment', NULL, 'MyCompetences');
 INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext) VALUES ('extendedprofile_registration', 'mydiplomas', 'checkbox', 'User', 'false', 'ExtendedProfileRegistrationTitle', 'ExtendedProfileRegistrationComment', NULL, 'MyDiplomas');
 INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext) VALUES ('extendedprofile_registration', 'myteach', 'checkbox', 'User', 'false', 'ExtendedProfileRegistrationTitle', 'ExtendedProfileRegistrationComment', NULL, 'MyTeach');