sphinx - Exclude database from django migrations -
is there way exclude database django migrations?
i have sphinxsearch database in django project:
databases['sphinxsearch'] = { 'engine': 'sphinxsearch.backend.sphinx', ... }
and when try run manage.py makemigrations command, django tries run show full tables
query against it
which leads error, because wrong syntax sphinxql
file "c:\anaconda\lib\site-packages\django\db\backends\mysql\introspection.py", line 56, in get_table_list cursor.execute("show full tables") ... django.db.utils.programmingerror: (1064, "sphinxql: syntax error, unexpected ident, expecting variables near 'full tables'")
an exception rule makemigrations command.
it validates migration history in databases catch problems existing migration files (which caused editing them) before creating new migrations.
by default, checks default database, consults allow_migrate()
method of routers if installed.
makemigrations
creates migrations model changes, if allow_migrate()
returns false
, migration operations model_name silently skipped when running migrate on db.
changing behavior of allow_migrate()
models have migrations may result in broken foreign keys, tables, or missing tables. when makemigrations
verifies migration history, skips databases no app allowed migrate
.
Comments
Post a Comment