backend-orm-migrations

Define ORM and migration contracts for backend service repositories.

Updated Jun 28, 2026
One-click install
npx skills add https://github.com/jason23452/my-skill --skill backend-orm-migrations-jason23452
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: backend-orm-migrations
Source: https://github.com/jason23452/my-skill/tree/main/backend/backend-orm-migrations
Command: npx skills add https://github.com/jason23452/my-skill --skill backend-orm-migrations-jason23452

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Backend teams often leave database persistence vague in task specs, leading to inconsistent ORM choices, missing migration commands, and unclear model paths. This Skill enforces a concrete, implementable ORM and migration contract so every schema change has exact paths, commands, and verification steps. ## Core Features & Use Cases - Framework-aware selection: Detects existing ORM/migration tooling (SQLAlchemy/Alembic, Django migrations, Prisma, Drizzle, TypeORM, Knex) and never introduces a second migration framework. - Exact contract output: Generates task handoff sections naming ORM, migration framework, DB/session path, model paths, migration config, and create/apply/inspect commands. - Stack-specific references: Provides detailed guides for FastAPI + SQLAlchemy + Alembic, Django, and Node/TypeScript backends. - Use Case: When planning a new FastAPI + PostgreSQL service, use this Skill to produce a task.md that specifies app/core/database.py, app/models/, Alembic commands, and verification steps instead of vague "add models/migrations" notes. ## Quick Start Ask the AI to define the ORM and migration contract for your backend repository, including exact model paths, migration commands, and verification steps.

Frequently Asked Questions about backend-orm-migrations

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up SQLAlchemy and Alembic migrations in a FastAPI project?▼

Add sqlalchemy, asyncpg, and alembic with uv, create app/core/database.py for the async engine and session, define Base metadata in app/models/base.py, then run alembic init migrations. Create migrations with alembic revision --autogenerate and apply them with alembic upgrade head.

Prisma vs Drizzle vs TypeORM for Node backend migrations?▼

Keep whichever ORM the repository already uses; never introduce a second migration framework. Prisma uses prisma/schema.prisma and prisma migrate dev, Drizzle uses drizzle.config and repo scripts, and TypeORM relies on data source config with migration:generate and migration:run scripts.

Should frontend or admin UI repos own database migrations?▼

No. Only the backend service repo owns ORM, migration, table, and database session work. Frontend and admin UI repos consume API contracts from backend tasks and must not declare persistence responsibilities.

What happens if the backend framework cannot be determined?▼

The Skill returns a blocker instead of guessing. It blocks with TASK_CONCRETE_CONTRACT_MISSING when repo evidence cannot identify the ORM, migration tool, or exact paths, rather than writing vague tasks like "models/migrations".

Is it safe to run autogenerated migrations directly?▼

No. Always review generated migrations before applying them, never hide destructive operations inside autogenerated files, and never reset or drop a database volume without explicit user approval.