Describe the bug
wheels.tests.specs.migrator.migratorSpec (the migrateTo :: uses specified versions table name suite) creates a foreign key constraint named fk_wheels_level but does not drop it on teardown. When the spec runs against the same database a second time (which happens inside one matrix job because the spec executes the migration up and re-executes it), the constraint creation errors:
Evidence
Compat-matrix run #25837380625 (2026-05-13).
Expected behavior
The migrator spec should run repeatedly within the same test session without leaving constraints behind. Either:
- Drop the constraint in the suite's
afterEach / afterAll, or
- Use a uniquely-named constraint per spec run (timestamp suffix), or
- Use the down-migration to clean up after the up.
Root cause
Pure test-cleanup bug. The migrator spec uses a hardcoded constraint name and re-runs without teardown. Cockroach/Postgres silently tolerate the redefinition; MySQL/H2/SQL Server/Oracle correctly reject it.
Suggested fix shape
Add a teardown step that drops fk_wheels_level (and any other named constraints created in the spec) before each run, or rewrite to use a per-test-run unique name. Low effort.
Additional context
Related: #2649, #2663
Describe the bug
wheels.tests.specs.migrator.migratorSpec(themigrateTo :: uses specified versions table namesuite) creates a foreign key constraint namedfk_wheels_levelbut does not drop it on teardown. When the spec runs against the same database a second time (which happens inside one matrix job because the spec executes the migration up and re-executes it), the constraint creation errors:Duplicate foreign key constraint name 'fk_wheels_level'Constraint "FK_WHEELS_LEVEL" already exists; SQL statement: ALTER TABLE c_o_r_e_migrator_versions ADD CONSTRAINT fk_wheels_level FOREIGN KEY ...There is already an object named 'fk_wheels_level' in the database.ORA-02264: name already used by an existing constraint(counted in ci: Oracle datasource broken across all engines — Invalid URL, missing DBMS_LOCK, constraint cleanup #2663)Evidence
Compat-matrix run #25837380625 (2026-05-13).
h2,mysql,sqlserver(3 total).IF NOT EXISTS-style behavior or the constraint name handling differs.Expected behavior
The migrator spec should run repeatedly within the same test session without leaving constraints behind. Either:
afterEach/afterAll, orRoot cause
Pure test-cleanup bug. The migrator spec uses a hardcoded constraint name and re-runs without teardown. Cockroach/Postgres silently tolerate the redefinition; MySQL/H2/SQL Server/Oracle correctly reject it.
Suggested fix shape
Add a teardown step that drops
fk_wheels_level(and any other named constraints created in the spec) before each run, or rewrite to use a per-test-run unique name. Low effort.Additional context
continue-on-error: trueat the workflow level.Related: #2649, #2663