Skip to content

Add install-time menu FK for fresh-install schema parity #9

@mambax7

Description

@mambax7

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions