kysely-schema-migrations
Installation
SKILL.md
Kysely Schema Builders & Migrations
Write type-safe database schema changes and migrations using Kysely's schema builder API.
Decision Tree
- Create a table →
db.schema.createTable() - Add a column to existing table →
db.schema.alterTable().addColumn() - Modify a column →
db.schema.alterTable().alterColumn() - Drop a column →
db.schema.alterTable().dropColumn() - Rename a table →
db.schema.alterTable().renameTo() - Create an index →
db.schema.createIndex() - Create a PG enum →
db.schema.createType().asEnum() - Create a view →
db.schema.createView() - Write a migration → export
up/downfunctions withKysely<any> - Run migrations →
Migrator+FileMigrationProvider