ifixkart-admin/.agents/skills/mysql_migration_safety/SKILL.md
Adithiyan bbd3a3e959 feat: initial commit — full platform snapshot
- Backend: FastAPI app with all models, services, schemas, routes
- Admin Panel: Next.js dashboard with all modules
  (CRM, POS, repairs, warranties, billing, notifications, etc.)
- Ecommerce: storefront (submodule) + product catalog
- AI Agents: .agents/ skill library for Antigravity IDE
- Docs: architecture, billing, notification gateway markdown
- Submodules: Backend/OpenWA, Ecommerce/File 2/storefront
2026-10-13 12:59:47 +05:30

1 KiB

name description
MySQL Migration Safety Ensures database schema migrations are safe, non-blocking, and backwards-compatible.

Skill: MySQL Migration Safety

1. Purpose

Avoid database downtime, long table locks, or transactional data loss when applying migrations using Alembic in production.

2. When to Use

Before generating or applying Alembic database migration scripts.

3. Step-by-Step Checklist

  1. Backward Compatibility: Ensure new columns are added as nullable or with a default value.
  2. Table Locking Check: Avoid adding indexes or modifying column types directly on large tables (e.g. over 100k rows) during peak hours. Use online schema change patterns if necessary.
  3. Data Migrations: Separate schema changes (DDL) from data transformation changes (DML) into distinct migration steps.
  4. Rollback Script: Ensure downgrade() in Alembic is fully implemented and tested.
  5. Alembic History: Run alembic history to confirm there are no branching version conflicts.