← ClaudeAtlas

flywaylisted

Scaffold a Flyway migration SQL file with a build-enforced filename and PostgreSQL conventions. Use when a persistence change (entity/column/index) needs a migration — authored in the SAME change as the entity.
ch4570/vulpora · ★ 1 · API & Backend · score 67
Install: claude install-skill ch4570/vulpora
# flyway — migration SQL scaffold Generate a Flyway migration that satisfies the enforced filename grammar and the project's PostgreSQL conventions. If the target repository has a path-scoped migration rule, apply it as an additional overlay (the rule reminds; this skill scaffolds). > **Authority**: the project's `AGENTS.md` (Flyway section) is binding when present. Risk-review > destructive/locking changes with `postgres-risk-check`; schema design with `postgres-schema-design`. > Deep reference: [`reference/principles.md`](reference/principles.md) and [`reference/kb/`](reference/kb/INDEX.md). ## Where it goes / filename (build-validated) - Versioned migrations live under a single canonical migration directory (e.g. `flyway/migration/postgresql/common/`); environment subfolders (`ci/dev/local/`) hold env overrides only. - Filename: **`V{yyyyMMdd.HHmmss}__{description}.sql`** where `{description}` matches `[A-Za-z0-9_]{1,50}`. House style: `V{ts}__{domain}__{action}_{entity}.sql` (e.g. `V20260428.110000__order__create_table_order.sql`). Repeatable: `R__{desc}.sql`. ## Skeleton ```sql -- V20260623.140000__order__create_table_order.sql CREATE TABLE IF NOT EXISTS "order"."order" ( order_id varchar(126) NOT NULL, status varchar(50) NOT NULL, created_at timestamptz NOT NULL, updated_at timestamptz NOT NULL, CONSTRAINT pk_order_order PRIMARY KEY (order_id) ); COMMENT ON TABLE "order"."order" IS '주문'; CREATE INDEX CONCURRENTLY IF NOT EXISTS ix_order