mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-02-04 08:13:38 +00:00
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:
parent
e6117fbcdf
commit
db548a4e24
@ -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)
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user