Skip to content

[Bug]: Mezzanine Django migration fails because information_schema.check_constraints is missing #29101

Open

Description

@daviszhen

Summary

The Mezzanine application cannot start against the online MatrixOne v4.2.0 environment because Django's MySQL schema introspection queries information_schema.check_constraints, but the view is not exposed. The failure occurs during manage.py migrate before the application serves its readiness endpoint.

This blocks the complete Mezzanine scenario: every workflow readiness case fails and all dependent cases are blocked.

Environment

No credentials are included in this report.

Reproduction

The online tenant reports:

SELECT git_version(), version();
-- 7a68d42c4e  8.0.30-MatrixOne-v4.2.0

SELECT COUNT(*)
FROM information_schema.check_constraints;

Actual result:

ERROR 1064 (42000): SQL parser error: table "check_constraints" does not exist

The same error is emitted by Django during startup:

+ /usr/local/bin/python manage.py migrate --noinput
Running migrations:
Applying core.0002_auto_20150414_2140...

MySQLdb.ProgrammingError: (1064,
'SQL parser error: table "check_constraints" does not exist')

The relevant Django call path is:

schema_editor.alter_field
  -> _constraint_names
  -> connection.introspection.get_constraints
  -> information_schema.check_constraints

The container exits with status 1 and enters CrashLoopBackOff.

Actual scenario result

  • 20 workflows: failed
  • 200 cases total
  • 20 readiness cases: failed
  • 180 dependent cases: blocked by a previous failed case
  • No business API case reached execution

The database-init container completes successfully; the failure is in the application migration stage, not database connectivity or workflow business logic.

Expected behavior

MatrixOne should expose a MySQL-compatible information_schema.check_constraints view/table. It may be empty when no check constraints exist, but the relation must be queryable so Django and other MySQL schema-migration tools can introspect constraints.

After the view is available, python manage.py migrate --noinput should complete and the Mezzanine readiness endpoint should become available.

Impact

Any Django/MySQL application that calls DatabaseIntrospection.get_constraints() can fail during migration or schema synchronization. The application cannot start, so all higher-level application compatibility tests are blocked.

Related issues

  • #24730 tracks the missing information_schema.check_constraints view.
  • #25103 tracks broader information_schema compatibility gaps.

The current v4.2.0 online tenant still reproduces the missing-view behavior. Please clarify whether the fix is absent from this release, requires a tenant/system-view upgrade, or has regressed.

Acceptance criteria

  1. SELECT * FROM information_schema.check_constraints LIMIT 1 succeeds on the supported MatrixOne release/tenant.
  2. Mezzanine's manage.py migrate --noinput completes without the 1064 parser error.
  3. The Mezzanine Web container remains ready instead of entering CrashLoopBackOff.
  4. The scenario can execute its readiness and subsequent workflow cases.

Activity

  1. added
    kind/bug
    kind/compatibility
    on Sep 18, 2026
  2. daviszhen commented on Sep 19, 2026

    @daviszhen
    ContributorAuthor

    状态复核结论

    该问题应分为两个版本面判断:

    1. 当前 main:SQL 能力已经实现。

    2. issue 所报告的 4.2 环境:仍未解决。

      • 当前 4.2-dev 仍是报告中的 7a68d42c4ec151f9af5890ee56b4d24afd87b843,该源码树没有 InformationSchemaCheckConstraintsDDL,也没有对应 tenant upgrade 注册;
      • 当前 v4.2.1-hotfix head 115c227239c65dfe36e14379d958033bf274f8f4 同样没有上述实现;
      • main 的实现提交 b84a66270605 / #26785 不在报告的 4.2 分支历史中。

    此外,main 的升级入口受 MORPC protocol version 约束;新 root tenant 的 smoke test 不能替代现有 tenant upgrade 和普通应用用户可见性验证。

    结论:main 上已实现,但受影响的 4.2 release/tenant 尚未解决,因此整体状态是部分解决。 下一步需要明确 4.2 的 backport/release 路径,在现有 tenant 上执行升级验证,然后重跑 manage.py migrate --noinput、readiness 和后续 workflow。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/compatibilitykind/bugkind/compatibility

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions