create-database-migration

Official

Generate Knex migrations for Benefriches API.

Authorincubateur-ademe
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill automates the creation and maintenance of Knex database migrations for the Benefriches API, enabling safe schema evolution in development and production.

Core Features & Use Cases

  • Migration scaffolding: Generate timestamped migration files following project conventions.
  • Schema evolution: Support create/alter/rename/drop table and column changes, plus data migrations.
  • Consistency enforcement: Remind to update tableTypes.d.ts and run migrations to keep codegen in sync.

Quick Start

  1. Create a migration: pnpm --filter api knex:new-migration {description}
  2. Implement up() and down() in the generated file
  3. Update apps/api/src/shared-kernel/adapters/sql-knex/tableTypes.d.ts if schema changes
  4. Run migrations: pnpm --filter api knex:migrate-latest

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: create-database-migration
Download link: https://github.com/incubateur-ademe/benefriches/archive/main.zip#create-database-migration

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.