database-migration-create

Create and apply versioned SQL migrations with rollback plans.

Updated Jan 8, 2026
One-click install
npx skills add https://github.com/cpa03/blueprintify --skill database-migration-create
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-migration-create
Source: https://github.com/cpa03/blueprintify/tree/main/.opencode/skill/database-migration-create
Command: npx skills add https://github.com/cpa03/blueprintify --skill database-migration-create

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Safely creates database migrations to manage schema changes without data loss or downtime, ensuring version-controlled updates across environments.

Core Features & Use Cases

  • Migration drafting: Generate UP/DOWN SQL scripts for schema changes and apply them locally for verification.
  • ** ORM synchronization**: Update ORM definitions and types to reflect the new schema.
  • Use Case: When a schema change is required, the skill analyzes the change, produces migration scripts, and validates them against a local database.

Quick Start

Run the database-migration-create skill to generate and apply a safe migration for your current schema change.

Frequently Asked Questions about database-migration-create

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

FAQPage Schema
How do I generate safe SQL migrations for schema changes without data loss?

You can generate safe SQL migrations by analyzing schema changes to produce UP/DOWN scripts that enforce checks for locking issues and data loss risks. This ensures version-controlled updates across local and CI environments without downtime.

What is the best way to rollback a database migration if something goes wrong?

Rolling back a database migration is handled by generated DOWN scripts. These scripts are produced alongside UP scripts to provide a verified rollback plan, ensuring data integrity when reverting schema changes locally or in CI.

How do I synchronize ORM definitions after applying a database schema change?

Synchronizing ORM definitions after a schema change involves updating ORM definitions and types to reflect the new database schema. This maintains proper ORM mappings while applying versioned SQL migrations locally for verification.

Does this migration workflow support both local development and CI environments?

This migration workflow supports both local development and CI environments. It manages versioned migrations, rollback plans, and ORM synchronization across these environments while enforcing checks for locking issues and data loss risks.

Why do my database migrations risk data loss and how can I prevent it?

Database migrations risk data loss when schema changes lack validation. Prevent this by enforcing checks for data loss risks and locking issues during migration creation, producing verified UP/DOWN scripts for safe application.