Database migration

From agulli/atlas-agents · View interactive version

Database migration is an AI agent skill from the GitHub repository agulli/atlas-agents. Safely run database schema migrations. Use when asked to update database schema, add columns, create tables, run alembic, or apply Django migrations.

How to use this skill

Skill file

Clarification Gates

Before executing any migration, you must have clear answers to all of the following. If any is missing or ambiguous, STOP and ask. Do not infer from filenames, branch names, or previous conversation context.

An agent that guesses the environment and gets it wrong has just migrated the wrong database. Ask first.

Process

  1. Identify the migration tool. Check the project for:

If none are found, ask the user which tool to use. Do not guess.

  1. Generate the migration.
  1. Review the generated migration file. Read the entire file. Check for:
  1. Dry run. If the tool supports it:
  1. Apply the migration only after reviewing the dry run output.
  1. Verify. Query the database schema directly to confirm the change took effect:

```sql

-- PostgreSQL

SELECT column_name, data_type FROM information_schema.columns WHERE table_name = 'target_table';

-- SQLite

PRAGMA table_info(target_table);

```

Rationalizations

| Excuse | Rebuttal |

|--------|----------|

| "It's just an ADD COLUMN, I'll skip the review" | Schema locks can occur even on simple additions. Always review. |

| "The autogenerated migration looks correct" | Autogenerate guesses. It sometimes generates DROP + CREATE instead of ALTER. Read the file. |

| "I'll just run it — we can roll back" | Not all migrations are reversible. Dropping a column destroys data permanently. |

Verification

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.