我有一个在 django 和烧瓶之间共享的数据库。
在烧瓶应用程序中,我使用 sqlAlchemy 并使用 Alembic 迁移数据库。但是当我迁移数据库并使用命令时:
$ alembic revision --autogenerate -m "some message"
它将自动删除 django 创建的所有表:
INFO [alembic.migration] Context impl MySQLImpl.
INFO [alembic.migration] Will assume non-transactional DDL.
INFO [alembic.autogenerate] Detected removed table u'django_content_type'
INFO [alembic.autogenerate] Detected removed table u'auth_group'
INFO [alembic.autogenerate] Detected removed table u'auth_user'
INFO [alembic.autogenerate] Detected removed table u'auth_user_groups'
INFO [alembic.autogenerate] Detected removed table u'django_session'
INFO [alembic.autogenerate] Detected removed table u'auth_permission'
INFO [alembic.autogenerate] Detected removed table u'auth_user_user_permissions'
INFO [alembic.autogenerate] Detected removed table u'account_userprofile'
INFO [alembic.autogenerate] Detected removed table u'south_migrationhistory'
INFO [alembic.autogenerate] Detected removed table u'django_site'
如何配置 Alembic 使数据库迁移不会删除 django 的表?