0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-04 10:39:43 +08:00
discourse/.skills/discourse-migration
Alan Guo Xiang Tan 8155b8579d
DEV: Warn against schema changes in transaction-disabled migrations (#40360)
This adds a rule to the migration guide (`.skills/discourse-migration`)
covering migrations that call `disable_ddl_transaction!`.

Without the wrapping transaction, each statement autocommits instead of
running inside one transaction for the whole migration. If such a
migration performs several schema changes and one fails partway through,
the statements that already ran are committed and cannot be rolled back,
leaving the schema half-migrated.

This commit adds a section and a review-checklist item that keep a
transaction-disabled migration limited to the operation that requires it
(concurrent index creation, batched backfills) and move any accompanying
schema changes into a separate migration that keeps its DDL transaction.
2026-05-28 17:23:15 +08:00
..
SKILL.md DEV: Warn against schema changes in transaction-disabled migrations (#40360) 2026-05-28 17:23:15 +08:00