Make migration work for older version upgrades

With the --fake-initial argument to migrate, Django will detect the
existance of initial table with the precondition that the table schema
must be the same as the first migration (it is in this case).

https://docs.djangoproject.com/en/1.8/topics/migrations/#adding-migrations-to-apps
This commit is contained in:
Sunil Mohan Adapa authored and James Valleroy committed 2015-12-05 09:33:23 -05:00
1 parent e6117fbcdf
commit db548a4e24
1 file changed
+2 -1
+2 -1
View File
@@ -273,7 +273,8 @@ def configure_django():
logger.info('Configured Django with applications - %s', applications)
logger.info('Creating or adding new tables to data file')
django.core.management.call_command('migrate', interactive=False)
django.core.management.call_command('migrate', '--fake-initial',
interactive=False)
os.chmod(cfg.store_file, stat.S_IRUSR | stat.S_IWUSR | stat.S_IRGRP)