I have existing database and no migrations files (which was lost for some reasons). I have some new models, which are not correspond to existing database, some tables are altered in comparison with existing database. I'd like to synchronize db and models, means alter some tables in existing database.
I have try this:
Django 1.8: Create initial migrations for existing schema
but when run manage migrate --fake-initial
(or --fake
) my first migration (created from new models) are marked as FAKED, so, if I got it well, fully ignored, so no tables are altered.
Are there any way to automatically synchronize db and models (w/o exporting/importing data from/to db)? Somehow make initial migration as snapshot of existing database and then make migrations, relative to it?