Skip to content

fix: correct column position syntax in migration 380#807

Merged
RussH merged 2 commits into
opencats:masterfrom
anonymoususer72041:fix/migration-380-before-syntax
Jun 23, 2026
Merged

fix: correct column position syntax in migration 380#807
RussH merged 2 commits into
opencats:masterfrom
anonymoususer72041:fix/migration-380-before-syntax

Conversation

@anonymoususer72041

Copy link
Copy Markdown
Contributor

This fixes the SQL syntax used in migration 380 when adding the date_occurred column to the activity table.

The migration previously used BEFORE date_created, which is not valid syntax for ALTER TABLE ... ADD COLUMN in MySQL/MariaDB. This could cause the migration to fail when upgrading an existing installation.

The column is now added AFTER entered_by, which is valid MySQL/MariaDB syntax and preserves the intended column order because entered_by is directly before date_created in the current schema.

This keeps the migration aligned with the schema used for fresh installations.

@anonymoususer72041 anonymoususer72041 requested a review from RussH June 10, 2026 15:33
@anonymoususer72041 anonymoususer72041 force-pushed the fix/migration-380-before-syntax branch from 077da7e to 625485b Compare June 10, 2026 15:34
@anonymoususer72041

Copy link
Copy Markdown
Contributor Author

@RussH this PR also needs to be merged before next release

@anonymoususer72041 anonymoususer72041 force-pushed the fix/migration-380-before-syntax branch from 625485b to 4e62857 Compare June 10, 2026 15:41

@RussH RussH left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks again! Please can you update this branch by merging current master into it, then I’ll re-check CI and approve/merge.

@RussH RussH self-requested a review June 23, 2026 09:00

@RussH RussH left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

have merged current master, all good now.

@RussH RussH merged commit c773d3b into opencats:master Jun 23, 2026
4 checks passed
@anonymoususer72041 anonymoususer72041 deleted the fix/migration-380-before-syntax branch June 23, 2026 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants