db-migration
Skill3 starsChanged 8 months agoApache-2.0View on GitHub
Guide through a database schema change. Use when you need to modify the database schema, add columns, create tables, or run migrations.
6 other projects use a version of this.
Adopted by
Most recently taken up by
- TienDat-Vna/BackSpectheir own version, first seen Sep 28, 2026
- aiqadam/qadam-flowtheir own version, first seen Sep 20, 2026
- tadoEng/web-startertheir own version, first seen Aug 11, 2026
- nikandr-surkov/ai-saas-startertheir own version, first seen Jul 12, 2026
- PiloTracer/pilo.ai.logicbisontheir own version, first seen Jul 6, 2026
- viknesh20-20/claude-code-tool-kittheir own version, first seen May 2, 2026
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 6
- nikandr-surkov/ai-saas-starter★ 23same name
- viknesh20-20/claude-code-tool-kit★ 7same name
- aiqadam/qadam-flow★ 4same name
- tadoEng/web-starter★ 2same name
- TienDat-Vna/BackSpec★ 1same name
- PiloTracer/pilo.ai.logicbison★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository21 other files it gives its agents.
- framework/CLAUDE.mdCLAUDE.md
- auditSkill
- dep-auditSkill
- hygiene-auditSkill
- review-prSkill
- api-conventionsSkill
- dashboard-conventionsSkill
- doc-architectureSkill
- fix-issueSkill
- new-endpointSkill
- new-mcp-toolSkill
- test-allSkill
- deploySkill
- deploy-statusSkill
- incidentSkill
- dreamSkill
- brainstormSkill
- debateSkill
- exec-planSkill
- launch-reviewSkill
- plan-featuresSkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 5 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Update the relevant model in the project's model/schema directory.
- Distinctive: line 45
Default values requiring table rewrites
- Distinctive: line 47
If the migration requires unsupported operations, create a manual migration that:
- Distinctive: line 55
Before running any migration on production data:
- Distinctive: line 79
Write tests to verify:
“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Database Migration
Guide a database schema change: $ARGUMENTS
Steps
1. Modify the model
Update the relevant model in the project's model/schema directory. ORM classes (SQLModel, SQLAlchemy, Prisma, etc.) define both the application model and the database schema.
2. Create migration
Generate the migration using the project's migration tool:
# Alembic (Python/SQLAlchemy)
alembic revision --autogenerate -m "$ARGUMENTS"
# Prisma (TypeScript/Node)
npx prisma migrate dev --name "$ARGUMENTS"
# Django
python manage.py makemigrationsReview the generated migration before applying.
3. Database-specific limitations
SQLite has limited ALTER TABLE support:
- Can ADD COLUMN
- Cannot DROP COLUMN (before SQLite 3.35)
- Cannot ALTER COLUMN type
- For complex changes, may need to recreate the table
PostgreSQL/MySQL support most ALTER TABLE operations but watch for:
- Lock contention on large tables
- Default values requiring table rewrites
If the migration requires unsupported operations, create a manual migration that:
- Creates a new table with the desired schema
- Copies data from the old table
- Drops the old table
- Renames the new table
4. Backup first
Before running any migration on production data:
# SQLite
cp database.db database.db.backup
# PostgreSQL
pg_dump dbname > backup.sql5. Apply migration
# Alembic
alembic upgrade head
# Prisma
npx prisma migrate deploy
# Django
python manage.py migrate6. Test
Write tests to verify:
- New schema works with existing data
- Migration is reversible (if supported by the migration tool)
- Application still functions correctly with the new schema
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

