0
有沒有辦法從django遷移中排除數據庫?從django遷移中排除數據庫
我有一個sphinxsearch數據庫在我的Django項目:
DATABASES['sphinxsearch'] = {
'ENGINE': 'sphinxsearch.backend.sphinx',
...
}
當我嘗試運行manage.py makemigrations命令,Django的嘗試對其運行 SHOW FULL TABLES
查詢
這導致錯誤,因爲這是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'")
嘗試創建數據庫路由器並返回''False' for ['allow_migrate'](https://docs.djangoproject.com/en/1.11/topics/db/multi-db/#allow_migrate) – Alasdair