kiwi-tcms - 从 v6.4 迁移到 v7.2 失败,并显示“列 'execution_id' 不能为空”
问题描述
在基于 docker kiwitcms/kiwi:latest (v7.2 digest d757b56bc10c) 镜像的 docker 容器中运行迁移。在迁移期间 testcases.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")
解决方案
这是迁移脚本中的错误。问题在于,在这些更改之前,您可以直接将错误附加到测试用例,而无需实际执行测试。这导致该case_run_id
字段为无。
随着新的变化,错误只能附加到测试执行中,并且它们的execution_id
字段应该总是有一个值。
你能试试这个补丁,让我知道它是否适合你: https ://github.com/kiwitcms/Kiwi/pull/1266
推荐阅读
- c++ - 为什么我会因为这个 dp 问题而稍微偏离输出?
- javascript - CSS3DRenderer中没有任何错误的三.JS空白页面
- json - 如何修复 JSON 解析错误:React Native 中出现意外的标识符“对象”?
- javascript - 防止离开 Web 应用程序并重定向到任何其他链接
- javascript - 使用 Vuetify2 在工具栏徽标上应用填充
- java - 试图找到一种从中心窗格控制器调用边框窗格上的 setCenter 方法的方法
- javascript - 如何正确地从 Javascript 中的函数返回结果?
- email - 在电子邮件信封中添加接收字段
- java - 如何在 if 语句中使用 setOpaque(true/false)
- google-sheets - 如何在更短的时间内使用谷歌表格创建电报民意调查