changeset 1835:971ce5e20856 beta

added warning on sqlite when using migration. Sqlite prior to 3.7 series are known to not support some migration changes like table renames. Thus are failing.
author Marcin Kuzminski <marcin@python-works.com>
date Fri, 06 Jan 2012 06:19:04 +0200
parents aa4423c82c23
children 445861e156d1
files rhodecode/lib/db_manage.py
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/rhodecode/lib/db_manage.py	Thu Jan 05 19:29:08 2012 +0200
+++ b/rhodecode/lib/db_manage.py	Fri Jan 06 06:19:04 2012 +0200
@@ -97,6 +97,13 @@
         from rhodecode.lib.dbmigrate.migrate.exceptions import \
             DatabaseNotControlledError
 
+        if 'sqlite' in self.dburi:
+            print (
+               '********************** WARNING **********************\n'
+               'Make sure your version of sqlite is at least 3.7.X.  \n'
+               'Earlier versions are known to fail on some migrations\n'
+               '*****************************************************\n'
+            )
         upgrade = ask_ok('You are about to perform database upgrade, make '
                          'sure You backed up your database before. '
                          'Continue ? [y/n]')
@@ -161,6 +168,9 @@
                 print ('Adding ldap defaults')
                 self.klass.create_ldap_options(skip_existing=True)
 
+            def step_4(self):
+                print ('TODO:')
+
         upgrade_steps = [0] + range(curr_version + 1, __dbversion__ + 1)
 
         # CALL THE PROPER ORDER OF STEPS TO PERFORM FULL UPGRADE