Skip to content

enh(Migration): add meta data information about DB changes - #3308

Merged
blizzz merged 1 commit into
mainfrom
enh/noid/migration-attributes
Nov 20, 2026
Merged

blizzz merged 1 commit into
mainfrom
enh/noid/migration-attributes

Conversation

@blizzz

@blizzz blizzz commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Quick follow up to #3131

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not needed
  • 🔙 Backport requests are created or not needed: /backport to stableX.X
  • 📅 Milestone is set
  • 🌸 PR title is meaningful (if it should be in the changelog: is it meaningful to users?)

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
@blizzz
blizzz requested review from a team, enjeck, mejo- and rubenvdlinde and removed request for a team November 20, 2026 13:32
#[AddColumn(table: 'tables_contexts_page', name: 'description', type: ColumnType::TEXT)]
#[AddColumn(table: 'tables_contexts_page', name: 'version', type: ColumnType::INTEGER, description: 'optimistic locking counter, raised on every save')]
#[AddColumn(table: 'tables_contexts_page', name: 'slug', type: ColumnType::STRING, description: 'unique per application', notes: ['existing pages are filled in: start page "dashboard", others "page_<id>"'])]
#[AddIndex(table: 'tables_contexts_page', type: IndexType::UNIQUE, description: 'context_id + slug (tables_ctx_page_slug_uq)')]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the widget table indexes created in 'haveWidgetTable()' are missing from the metadata.
#[AddIndex(table: 'tables_contexts_widget', type: IndexType::INDEX, description: 'page_id (tables_ctx_widget_page_idx)')]
#[AddIndex(table: 'tables_contexts_widget', type: IndexType::INDEX, description: 'node_rel_id (tables_ctx_widget_node_idx)')]

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are being added upon creating, AddIndex is meant for manipulations of an existing table. As they start empty, there is no overhead of generating the index.

@blizzz
blizzz merged commit 63c95fd into main Nov 20, 2026
81 checks passed
@blizzz
blizzz deleted the enh/noid/migration-attributes branch November 20, 2026 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants