- Home
- Skills
- Dexploarer
- Hyper Forge
- Database Migration Helper
database-migration-helper_skill
- TypeScript
6
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill dexploarer/hyper-forge --skill database-migration-helper- SKILL.md8.3 KB
Overview
This skill creates safe, reversible database migrations across multiple ORMs and raw SQL. It generates schema changes, data migrations, indexes, constraints, and rollback steps with attention to transactional safety and production-ready practices. Use it to produce migration files, data transformation scripts, and a clear rollback plan.
How this skill works
The skill inspects the requested schema change and target ORM (Prisma, TypeORM, Alembic, Sequelize, raw SQL) and emits an up and down migration with appropriate types, enums, and indices. It includes optional data migration steps, transactional wrapping, and notes about performance (batching, indexing after bulk writes). It produces concise migration code, commands to run or revert, and a short checklist for testing and deployment.
When to use it
- Adding or removing tables, columns, enums, or indexes
- Refactoring schemas (splitting/renaming tables or columns)
- Creating complex data transformations or migrating JSON structures
- Preparing safe rollbacks before production deploys
- Converting ORM model changes into executable migrations
Best practices
- Always provide both up and down implementations and document destructive steps
- Run migrations on a copy of production data and validate results before deploy
- Use transactions and batching for large data migrations to avoid long locks
- Create or rebuild indexes after bulk inserts for faster writes
- Version-control all migration files and never edit deployed migrations
- Include short comments explaining non-obvious transformation logic
Example use cases
- Add a role enum and role column for users with index and default value, plus data backfill for existing rows
- Rename a column by creating a new column, migrating data, then dropping the old column with safe rollback
- Migrate relational rows into a JSONB profile field with transformation and integrity validation
- Create a new table schema, migrate existing data into it, drop the old table, and rename the new table
- Generate ORM-specific migrations (Prisma schema change, TypeORM migration class, Alembic revision, Sequelize file, or raw SQL up/down scripts)
FAQ
Yes. The generated migrations wrap data changes in transactions when supported by the database and migration tool, and recommend batching for large datasets.
How do you handle enum/type changes across databases?
The skill emits safe enum creation and removal steps (create type first, use it for column, drop type in down). For databases without native enums it uses constrained VARCHAR or a lookup table and documents the approach.