在基于docker kiwitcms / kiwi:latest(v7.2摘要d757b56bc10c)映像的Docker容器中运行迁移。 在迁移测试用例期间,0010_remove_bug失败,并出现一些数据库约束问题。
这是迁移脚本中的错误还是数据不一致的问题?
Operations to perform:
Apply all migrations: admin, attachments, auth, bugs, contenttypes, core, django_comments, kiwi_auth, linkreference, management, sessions, sites, testcases, testplans, testruns
Running migrations:
Applying testcases.0010_remove_bug...Traceback (most recent call last):
File "/venv/lib/python3.6/site-packages/django/db/backends/mysql/base.py", line 71, in execute
return self.cursor.execute(query, args)
File "/venv/lib/python3.6/site-packages/MySQLdb/cursors.py", line 209, in execute
res = self._query(query)
File "/venv/lib/python3.6/site-packages/MySQLdb/cursors.py", line 315, in _query
db.query(q)
File "/venv/lib/python3.6/site-packages/MySQLdb/connections.py", line 239, in query
_mysql.connection.query(self, query)
MySQLdb._exceptions.OperationalError: (1048, "Column 'execution_id' cannot be null")
答案 0 :(得分:0)
这是迁移脚本中的错误。问题在于,在进行这些更改之前,您可以将错误直接附加到测试用例上,而无需实际执行测试。这导致case_run_id
字段为无。
通过新的更改,错误只能附加到测试执行中,并且它们的execution_id
字段应始终具有值。
您可以尝试此补丁,让我知道它是否对您有用: https://github.com/kiwitcms/Kiwi/pull/1266