migration-checklist
Skill0 starsChanged 5 months agoMITView on GitHub
Veritabani migration oncesi kontrol listesi ve rollback proseduru
In this repository16 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- proje/CLAUDE.mdCLAUDE.md
- adr-writerSkill
- brainstormingSkill
- brainstormSkill
- code-auditSkill
- commitSkill
- create-prSkill
- governance-evalSkill
- governance-kurSkill
- security-scanSkill
- stack-loaderSkill
- systematic-debuggingSkill
- tddSkill
- test-scaffoldSkill
- yeni-projeSkill
The file
Files
Migration Kontrol Listesi
Migration yazmadan ONCE ve yazdiktan SONRA bu kontrol listesini uygula.
Migration ONCESI Kontrol
1. Etki Analizi
- Hangi tablolar etkileniyor?
- Mevcut veri kaybolur mu? (kolon silme, tip degistirme, tablo silme)
- Mevcut veri donusumu gerekiyor mu? (data migration)
- Diger tablolarla FK iliskisi var mi?
- Index etkileniyor mu?
Veri kaybeden migration varsa: Team Lead'e raporla, ADR gerekli.
2. Isimlendirme Kontrol
| Oge | Kural | Kontrol |
| Tablo | snake_case, cogul | users, order_items |
| Kolon | snake_case | first_name, created_at |
| FK | {entity}_id | user_id, order_id |
| Boolean | is_ / has_ prefix | is_active, has_permission |
| Timestamp | _at suffix | created_at, updated_at |
| Index | ix_{tablo}_{kolon} | ix_users_email |
| Unique | uq_{tablo}_{kolon} | uq_users_email |
3. Zorunlu Alanlar
Yeni tablo olusturuluyorsa, su alanlar ZORUNLU:
id— PK (UUID v7 onerilen / ULID / auto-increment)created_at— olusturulma (default: now)updated_at— guncelleme (auto-update)- Soft delete gerekiyorsa:
deleted_at(nullable)
4. Index Kontrolu
- FK alanlarina index eklendi mi?
- Unique constraint gereken alanlara unique index eklendi mi?
- Sik WHERE kosulunda kullanilacak alanlara index eklendi mi?
- Composite index gerekiyorsa siralama dogru mu? (en secici alan ilk)
5. Veri Tipleri
| Amac | Dogru Tip | YANLIS Tip |
| Para/fiyat | DECIMAL(18,2) | FLOAT, DOUBLE |
| Boolean | BOOLEAN | INT, TINYINT |
| Tarih | TIMESTAMP WITH TIMEZONE | VARCHAR, DATE (saat kaybeder) |
| PK | UUID v7 / BIGINT | VARCHAR |
Migration YAZARKEN
Rollback (Down) Kurallari
- Rollback metodu ASLA bos birakilmaz
- Kolon ekleme → rollback: kolonu sil
- Tablo ekleme → rollback: tabloyu sil (DROP)
- Kolon silme → rollback: kolonu geri ekle (veri kaybolur — bunu dokumante et)
- Tip degistirme → rollback: eski tipe geri don
Rollback yazilamazsa (geri donulemez degisiklik):
- Migration comment'inde acikca belirt:
// IRREVERSIBLE: {neden} - Team Lead'e raporla
- ADR gerektirir
Migration Atomikligi
- Her migration TEK bir degisiklik yapmali
- "Tablo olustur + 3 kolon ekle + index ekle" = TEK migration (ayni tablo)
- "Tablo A olustur + Tablo B'ye kolon ekle" = AYRI migration'lar
Migration SONRASI Kontrol
- Migration yukarı (up) calisiyor mu?
- Rollback (down) calisiyor mu?
- Mevcut veri bozulmuyor mu? (var olan kayitlar)
- FK constraint'leri dogru calisiyor mu?
- Index'ler olusmus mu?
- Cascade delete/update kurallari acikca belirtilmis mi?
Commit Mesaji
Migration iceren commit'lerde mesajda su bilgiler ZORUNLU:
- Hangi tablo/alan etkileniyor
- Migration dosyasinin adi
- Rollback gerektirip gerektirmedigi (geri donulemez ise acikca belirt)
Ornek: feat: users tablosuna phone_number alani eklendi (migration: 20260306_add_phone_to_users, rollback mevcut)
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.

