database-migrations

Manage reversible database schema changes and data migrations across PostgreSQL, MySQL, and ORMs.

3|1|Updated Mar 4, 2026
One-click install
npx skills add https://github.com/oabdelmaksoud/AGI-FARM-PLUGIN --skill database-migrations-oabdelmaksoud
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-migrations
Source: https://github.com/oabdelmaksoud/AGI-FARM-PLUGIN/tree/main/ecc-resources/docs/zh-CN/skills/database-migrations
Command: npx skills add https://github.com/oabdelmaksoud/AGI-FARM-PLUGIN --skill database-migrations-oabdelmaksoud

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides best practices and tools for managing database schema changes and data migrations safely, ensuring data integrity and minimizing downtime.

Core Features & Use Cases

  • Schema Evolution: Safely alter database tables, columns, and indexes.
  • Data Migration: Handle data backfilling, transformation, and cleanup.
  • Zero-Downtime Deployments: Implement strategies for seamless production updates.
  • Rollback Planning: Ensure changes can be reversed if necessary.
  • Use Case: When deploying a new feature that requires adding a new user_preferences table and populating it with default values for existing users, this Skill guides you through the process to avoid locking the database and ensure a smooth transition.

Quick Start

Use the database-migrations skill to safely add a new nullable column named 'avatar_url' to the 'users' table in PostgreSQL.

Frequently Asked Questions about database-migrations

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

FAQPage Schema
How do I perform zero-downtime database schema migrations in PostgreSQL?

Zero-downtime database schema migrations in PostgreSQL require separating schema alterations from data backfilling to avoid table locks. This approach ensures atomic, forward-only changes that maintain data integrity during seamless production updates.

What is the best way to add a nullable column without locking the database?

Adding a nullable column without locking the database involves applying forward-only schema changes separately from data operations. This strategy guarantees reversible updates and data integrity while preventing prolonged table locks during deployment.

Does this database migration approach work with both Prisma and Django ORMs?

Yes, this database migration approach works with Prisma, Django, TypeORM, and Drizzle ORMs. It provides safe schema evolution and data backfilling strategies tailored to each framework across PostgreSQL and MySQL environments.

How do I backfill data for existing users when adding a new table?

Backfilling data for existing users when adding a new table requires separating data migration operations from schema changes. This ensures safe data transformation and cleanup while maintaining zero-downtime deployment and rollback capabilities.

Why should schema and data migrations be handled as separate operations?

Schema and data migrations should be handled as separate operations to ensure atomic changes and minimize downtime. This separation allows safe rollback planning and prevents database locks during complex data backfilling and transformation.

Can I rollback a data migration if the deployment fails?

Yes, you can rollback a data migration because the process includes specific rollback strategies for schema alterations and data changes. This ensures changes can be safely reversed while maintaining data integrity across PostgreSQL and MySQL.