迁移django-firebird时出错

时间:2018-05-17 06:00:51

标签: python django firebird firebird2.5

使用 django-firebird 运行migrate命令将导致以下错误:

这是与自动生成的用户表相关的问题,因此很难修复它。

如果有任何帮助,我将不胜感激。

  Operations to perform:
  Apply all migrations: admin, auth, contenttypes, mdlservice, sessions
Running migrations:
  Applying auth.0001_initial... OK
  Applying admin.0001_initial... OK
  Applying admin.0002_logentry_remove_auto_add... OK
  Applying auth.0002_alter_permission_name_max_length... OK
  Applying auth.0003_alter_user_email_max_length... OK
  Applying auth.0004_alter_user_username_opts... OK
  Applying auth.0005_alter_user_last_login_null... OK
  Applying auth.0006_require_contenttypes_0002... OK
  Applying auth.0007_alter_validators_add_error_messages... OK
  Applying auth.0008_alter_user_username_max_length...Traceback (most recent call last):
  File "C:\Users\emptyspear\AppData\Local\Programs\Python\Python35-32\lib\site-packages\django\db\backends\utils.py", line 64, in execute
    return self.cursor.execute(sql, params)
  File "C:\Users\emptyspear\AppData\Local\Programs\Python\Python35-32\lib\site-packages\firebird\base.py", line 236, in execute
    return self.cursor.execute(q, params)
  File "C:\Users\emptyspear\AppData\Local\Programs\Python\Python35-32\lib\site-packages\fdb\fbcore.py", line 3627, in execute
    self._ps._execute(parameters)
  File "C:\Users\emptyspear\AppData\Local\Programs\Python\Python35-32\lib\site-packages\fdb\fbcore.py", line 3333, in _execute
    "Error while executing SQL statement:")
fdb.fbcore.DatabaseError: ('Error while executing SQL statement:\n- SQLCODE: -607\n- unsuccessful metadata update\n- MODIFY RDB$RELATION_FIELDS failed\n- action cancelled by trigger (1) to preserve data integrity\n- Cannot update index segment used by an Integrity Constraint', -607, 335544351)

开发环境如下

os:windows10

python:3.5.4

django:1.10.8

fdb:2.0.0

火鸟:2.5(32位)

django-firebird:https://github.com/maxirobaina/django-firebird

0 个答案:

没有答案