Summary
Ensure indexes declared on a newly created schema table are included in generated MySQL migrations.
Current behavior
When a table exists only in the target schema, the diff engine emits a single CreateTable operation.
The MySQL create-table generator emits columns and one primary key, but does not emit the table's declared indexes.
Because the diff stops after CreateTable, separate CreateIndex operations are not generated for that new table.
Expected behavior
Creating a new table must also create all indexes declared in its schema definition.
Generated down migrations must continue to remove the table safely.
Scope
Suggested files
modules/db/src/mig/sql/MySqlGenerator.cpp
modules/db/tests/mysql_generator_test.cpp
modules/db/tests/golden/...
Acceptance criteria
Non-goals
This issue does not include:
- foreign keys;
- full-text indexes;
- index prefixes;
- expression indexes;
- SQLite SQL generation.
Suggested labels
scope:db
type:bug
tests
good first issue
status:ready
Summary
Ensure indexes declared on a newly created schema table are included in generated MySQL migrations.
Current behavior
When a table exists only in the target schema, the diff engine emits a single
CreateTableoperation.The MySQL create-table generator emits columns and one primary key, but does not emit the table's declared indexes.
Because the diff stops after
CreateTable, separateCreateIndexoperations are not generated for that new table.Expected behavior
Creating a new table must also create all indexes declared in its schema definition.
Generated down migrations must continue to remove the table safely.
Scope
Suggested files
modules/db/src/mig/sql/MySqlGenerator.cppmodules/db/tests/mysql_generator_test.cppmodules/db/tests/golden/...Acceptance criteria
Non-goals
This issue does not include:
Suggested labels
scope:dbtype:bugtestsgood first issuestatus:ready