Database Migrations SQL Migrations
rmyndharis/antigravity-skills
SQL database migrations with zero-downtime strategies for PostgreSQL, MySQL, SQL Server
Agent skill
by jeremylongshore in jeremylongshore/tons-of-skills-marketplace
Process use when you need to work with database migrations. An agent skill from jeremylongshore/tons-of-skills-marketplace.
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill managing-database-migrations -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace managing-database-migrations --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.curated/managing-database-migrations .claude/skills/managing-database-migrations && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "managing-database-migrations" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/managing-database-migrations into .claude/skills/managing-database-migrations/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "managing-database-migrations", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/managing-database-migrationsType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill managing-database-migrations -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace managing-database-migrations --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/.curated/managing-database-migrations .agents/skills/managing-database-migrations && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "managing-database-migrations" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/managing-database-migrations into .agents/skills/managing-database-migrations/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "managing-database-migrations", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill managing-database-migrations -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace managing-database-migrations --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/.curated/managing-database-migrations .cursor/skills/managing-database-migrations && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "managing-database-migrations" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/managing-database-migrations into .cursor/skills/managing-database-migrations/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "managing-database-migrations", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/jeremylongshore/tons-of-skills-marketplace.git --path skills/.curated/managing-database-migrations--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill managing-database-migrations -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace managing-database-migrations --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/.curated/managing-database-migrations .gemini/skills/managing-database-migrations && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "managing-database-migrations" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/managing-database-migrations into .gemini/skills/managing-database-migrations/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "managing-database-migrations", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install jeremylongshore/tons-of-skills-marketplace managing-database-migrationsInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill managing-database-migrations -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/.curated/managing-database-migrations .github/skills/managing-database-migrations && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "managing-database-migrations" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/managing-database-migrations into .github/skills/managing-database-migrations/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "managing-database-migrations", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill managing-database-migrations -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace managing-database-migrations --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/.curated/managing-database-migrations .opencode/skills/managing-database-migrations && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "managing-database-migrations" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/managing-database-migrations into .opencode/skills/managing-database-migrations/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "managing-database-migrations", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
managing-database-migrationsProcess use when you need to work with database migrations. An agent skill from jeremylongshore/tons-of-skills-marketplace.
Managing Database Migrations is an agent skill from jeremylongshore/tons-of-skills-marketplace. Process use when you need to work with database migrations. This skill provides schema migration management with comprehensive guidance and automation. Trigger with phrases like "create migration", "run migrations", or "manage schema versions".
Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including scripts, reference files and assets (for example `assets/README.md`, `references/README.md` and `scripts/README.md`). Compatibility notes: Designed for Claude Code
It sits in Databases, covering Database migrations. It works with Prisma, PostgreSQL, SQL and MySQL. The repository describes itself as: Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com. The licence is MIT.
10 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit cfae287. It shows what the files ask for, not the result of running them.
Pre-approves these tools, so the agent can use them without asking each time:
ReadWriteEditGrepGlobBash(psql:*)Bash(mysql:*)Bash(mongosh:*)From allowed-tools in the SKILL.md frontmatter.
Ships 1 file in scripts/, which the agent can run.
Shell commands in SKILL.md call:
pg_dumpnpxFrom the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
documentation.red-gate.comalembic.sqlalchemy.orgprisma.ioreorg.github.iogithub.comFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Designed for Claude Code
From compatibility in the SKILL.md frontmatter.
Managing Database Migrations loads about 1.7k tokens when it runs, and up to ~1.8k if it reads all its reference files. Until then it costs about 68 tokens; SKILL.md has 843 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.
The full file from jeremylongshore/tons-of-skills-marketplace at commit cfae287, republished under its MIT licence (© jeremylongshore). 843 words, ~1,744 tokens.
.claude/skills/managing-database-migrations/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.Create, validate, and execute database schema migrations with full rollback support across PostgreSQL, MySQL, and MongoDB.
psql or mysql CLI for executing and verifying migrationspg_dump --schema-onlyCapture the current schema state before making changes. Run pg_dump --schema-only -f schema_before.sql (PostgreSQL) or mysqldump --no-data > schema_before.sql (MySQL) to create a reference point.
Define the desired schema change clearly: specify table name, column additions/removals/modifications, constraint changes, and index updates. Document whether the change is additive (safe) or destructive (requires data migration).
Generate a versioned migration file following the framework's naming convention:
V20240115_001__add_status_column_to_orders.sqlalembic revision --autogenerate -m "add status column to orders"schema.prisma then npx prisma migrate dev --name add_status_to_ordersnpx knex migrate:make add_status_to_ordersWrite the UP migration (forward change) with these safety practices:
IF NOT EXISTS for CREATE operations to make migrations idempotentBEGIN; ... COMMIT;Write the DOWN migration (rollback) that exactly reverses the UP migration. For column additions, the DOWN drops the column. For table renames, the DOWN renames back. For data transformations, the DOWN must restore original data (store it in a backup column or table if needed).
Validate the migration on staging by running the full migration sequence:
For zero-downtime migrations on production, follow the expand-contract pattern:
Handle large table migrations (>10M rows) with online DDL tools: pg_repack for PostgreSQL, pt-online-schema-change for MySQL, or gh-ost for MySQL. These tools create a shadow table, replicate changes, then swap atomically.
Update the migration history table and verify the migration version matches expectations. Run flyway info or alembic current to confirm.
Document the migration in a changelog with: migration version, description, tables affected, estimated execution time, rollback procedure, and any required application deployments.
| Error | Cause | Solution |
|---|---|---|
| Migration fails with lock timeout | Long-running queries blocking DDL locks on the target table | Set lock_timeout = '5s' to fail fast; retry during low-traffic period; use pg_repack for lock-free operations |
| Column cannot be dropped because of dependent views | Views or materialized views reference the column being removed | Drop or recreate dependent views first; use CASCADE only after verifying all dependents are acceptable to drop |
| NOT NULL constraint violation during migration | Existing rows have NULL values in a column being made NOT NULL | Add a backfill step: UPDATE table SET column = default_value WHERE column IS NULL before adding NOT NULL |
| Migration version conflict | Two developers created migrations with the same version number | Use timestamp-based versioning; resolve by renaming one migration and re-running |
| Rollback fails because data was inserted after UP migration | New data in added columns has no place to go in the old schema | Design rollback to handle new data (backup column, log discarded data); accept that some rollbacks are data-lossy |
Adding a status enum column to an orders table: Generate a migration that: (1) creates the enum type CREATE TYPE order_status AS ENUM ('pending', 'shipped', 'delivered'), (2) adds column ALTER TABLE orders ADD COLUMN status order_status, (3) backfills UPDATE orders SET status = 'delivered' WHERE shipped_at IS NOT NULL, (4) sets NOT NULL ALTER TABLE orders ALTER COLUMN status SET NOT NULL. Rollback drops the column and enum type.
Splitting a monolith users table into users and profiles: Expand phase adds profiles table and triggers to sync data. Migrate phase copies existing profile data in batches of 10,000 rows. Contract phase drops profile columns from users table after application code is updated.
Renaming a column without downtime: Create a migration that adds the new column, adds a trigger to sync writes between old and new columns, backfills existing data, deploys application code using the new column name, then drops the old column and trigger in a follow-up migration.
© jeremylongshore, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 3 other files (scripts, references, assets) in skills/.curated/managing-database-migrations of jeremylongshore/tons-of-skills-marketplace.
Open the folder on GitHubat commit cfae287
Managing Database Migrations next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Managing Database Migrations this skilljeremylongshore/tons-of-skills-marketplace | 2.8k | — | ~1.7k | Automated safety check: Pass | MIT | |
| Database Migrations SQL Migrationsrmyndharis/antigravity-skills | 1.7k | 3 repos | ~577 | Automated safety check: Notes | MIT | |
| DB Migrationhiromaily/go-crypto-wallet | 128 | — | ~652 | Automated safety check: Pass | MIT | |
| Database Migrationsaffaan-m/ECC | 276k | 3 repos | ~1.9k | Automated safety check: Pass | MIT | |
| Database MarchatCod-e-Codes/marchat | 137 | — | ~985 | Automated safety check: Pass | MIT | |
| DB Review312362115/claude | 107 | — | ~1.8k | Automated safety check: Pass | MIT |
rmyndharis/antigravity-skills
SQL database migrations with zero-downtime strategies for PostgreSQL, MySQL, SQL Server
hiromaily/go-crypto-wallet
Database schema and migration workflow. An agent skill from hiromaily/go-crypto-wallet.
affaan-m/ECC
数据库迁移最佳实践,涵盖模式变更、数据迁移、回滚以及零停机部署,适用于PostgreSQL、MySQL及常用ORM(Prisma、Drizzle、Django、TypeORM、golang-migrate)。
Cod-e-Codes/marchat
Changes marchat SQL schema and queries across SQLite, PostgreSQL, and MySQL using dialect helpers.
312362115/claude
数据库代码审查 + Migration 安全检查. An agent skill from 312362115/claude.
affaan-m/ECC
Şema değişiklikleri, veri migration'ları, rollback'ler ve PostgreSQL, MySQL ve yaygın ORM'ler (Prisma, Drizzle, Django, TypeORM, golang-migrate) arasında sıfır kesinti deployment'ları için…
jeremylongshore/tons-of-skills-marketplace
Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.
jeremylongshore/tons-of-skills-marketplace
Build this skill automates the adaptation of pre-trained machine learning models using transfer learning techniques.
jeremylongshore/tons-of-skills-marketplace
Execute proactive auto-loading: automatically detects and loads agents.md files.
jeremylongshore/tons-of-skills-marketplace
Aggregate and centralize performance metrics from applications, systems, databases, caches, and services.
jeremylongshore/tons-of-skills-marketplace
Execute this skill enables AI assistant to analyze capacity requirements and plan for future growth.
jeremylongshore/tons-of-skills-marketplace
Process use when you need to work with database indexing. An agent skill from jeremylongshore/tons-of-skills-marketplace.
Works with
Categories
Process use when you need to work with database migrations. An agent skill from jeremylongshore/tons-of-skills-marketplace. Managing Database Migrations is an agent skill from jeremylongshore/tons-of-skills-marketplace. Process use when you need to work with database migrations.
Managing Database Migrations fits situations like: you need to work with database migrations; with phrases like create migration; manage schema versions.
Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill managing-database-migrations -a claude-code`. Or copy the skill folder (skills/.curated/managing-database-migrations in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/managing-database-migrations in your project. Claude Code loads it when a task matches its description.
Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill managing-database-migrations -a codex`. Or copy the skill folder (skills/.curated/managing-database-migrations in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/managing-database-migrations in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill managing-database-migrations -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/managing-database-migrations, .gemini/skills/managing-database-migrations, .github/skills/managing-database-migrations and .opencode/skills/managing-database-migrations in your project.
Going by SKILL.md and its folder, Managing Database Migrations needs the command-line tools its instructions call (pg_dump and npx). Our summary lists: Node.js. Its frontmatter pre-approves these tools: Read, Write, Edit, Grep, Glob, Bash(psql:*), Bash(mysql:*), Bash(mongosh:*). Compatibility (from SKILL.md): Designed for Claude Code.
SKILL.md names 5 domains. As links in the text: documentation.red-gate.com, alembic.sqlalchemy.org, prisma.io, reorg.github.io and github.com. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.
Managing Database Migrations is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.7k tokens (SKILL.md is roughly 7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 18 tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Managing Database Migrations: Database Migrations SQL Migrations (rmyndharis/antigravity-skills, 1.7k stars), DB Migration (hiromaily/go-crypto-wallet, 128 stars), Database Migrations (affaan-m/ECC, 276k stars) and Database Marchat (Cod-e-Codes/marchat, 137 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,827 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 10, 2026.
Source: jeremylongshore/tons-of-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.