From kotlin-cross-cutting
Apply when creating, refactoring, changing, planning (plan mode) or reviewing any Flyway migration file, SQL schema change, or database table modification.
How this skill is triggered — by the user, by Claude, or both
Slash command
/kotlin-cross-cutting:versioning-database-schemaThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Version-control database schema changes with Flyway so that every environment (local, CI, staging, production) converges to the same schema state reliably and repeatably.
Version-control database schema changes with Flyway so that every environment (local, CI, staging, production) converges to the same schema state reliably and repeatably.
V<NNN>__<description>.sql
V prefix for versioned migrations (executed once, in order)<NNN> — zero-padded sequential number: V001, V002, ..., V042__ — double underscore separator<description> — snake_case summary of the change: create_team_table, add_version_to_annual_leavesrc/main/resources/db/migration/
├── V001__create_team_table.sql
├── V002__create_outbox_table.sql
├── V003__add_version_to_annual_leave.sql
└── V004__add_index_on_team_name.sql
created_at TIMESTAMP NOT NULL DEFAULT now() and updated_at TIMESTAMP NOT NULL DEFAULT now() to all tablesUUID for primary keyssnake_case for all table and column namesteams, annual_leaves) for consistencyversion INTEGER NOT NULL DEFAULT 0 column to entities that require optimistic lockingJSONB over multiple join tables for nested/variable structures when querying flexibility is neededNOT NULL by default — only allow NULL when the business domain requires itDO:
IF NOT EXISTS / IF EXISTS guards in DDL when appropriate for safetyDON'T:
DROP TABLE or DROP COLUMN without confirming the data is no longer neededCREATE INDEX CONCURRENTLY in PostgreSQL)org.flywaydb:flyway-core is on the classpathsrc/main/resources/db/migration/spring.flyway.* properties for configuration (url, user, password, locations)Please use always these examples as reference: examples.md
npx claudepluginhub allousas/claude-code-plugins --plugin kotlin-cross-cuttingGuides writing versioned database migrations for schema changes (add/remove columns, tables, indexes, constraints) with rollback and testing practices.
Generates versioned Flyway database migration scripts (V*.sql) with sequences, tables, constraints, and foreign keys from entity models. Useful for creating migrations, generating SQL scripts, or setting up database tables.
Creates, validates, executes, and rolls back schema migrations for PostgreSQL, MySQL, MongoDB using Flyway, Alembic, Prisma, Knex.