migrations

Installation
SKILL.md

Migrations

Standard Lucid migrations — BaseSchema subclasses in app/<mod>/database/migrations/<ts>_<name>.ts with up() and down(). Three things are specific to this starter kit:

  1. Assumes no production data. When adding a column to an existing table, edit the existing create_<table>_table.ts migration and run pnpm ace migration:fresh instead of layering an alter_table migration on top. The goal is that every downstream project inherits a clean single migration per table, not a create-then-alter chain.
  2. Migration paths are explicit per module in apps/web/config/database.tsconnections.postgres.migrations.paths. There is no autoloader. Add the module's path when it first gets a migration ([[module-scaffolding]]).
  3. apps/web/app/core/database/schema.ts is auto-generated but committed — models import their schemas from it, so ace cannot boot on a fresh checkout without the file. Regenerated on migration:run / fresh; commit the diff alongside the migration change. Framework-owned — never hand-edit or lint it.

Rules

Installs
7
GitHub Stars
96
First Seen
12 days ago
migrations — filipebraida/adonisjs-starter-kit