Fresh installs intentionally omit the menusitems.items_cid -> menuscategory.category_id foreign key because SqlUtility::prefixQuery() only rewrites the leading table name in installer SQL and cannot safely rewrite REFERENCES ... targets inside CREATE TABLE bodies.
PR #8 keeps install-time integrity by seeding categories before items, and the runtime System module update path already adds/restores the foreign key with properly prefixed table names.
Follow-up work for 2.7.1:
- evaluate adding the foreign key during fresh install using prefixed runtime SQL after the tables are created
- keep the implementation local to the installer instead of broadening
SqlUtility::prefixQuery()
- add test coverage for the install-time parity path
Fresh installs intentionally omit the
menusitems.items_cid -> menuscategory.category_idforeign key becauseSqlUtility::prefixQuery()only rewrites the leading table name in installer SQL and cannot safely rewriteREFERENCES ...targets insideCREATE TABLEbodies.PR #8 keeps install-time integrity by seeding categories before items, and the runtime System module update path already adds/restores the foreign key with properly prefixed table names.
Follow-up work for 2.7.1:
SqlUtility::prefixQuery()