add-migration
/add-migration
Tworzy i sprawdza migrację bazy danych po zakończonej zmianie modelu, z konfiguracją mapowania, artefaktami i kontraktem API.
- Autor
- kadirguloglu ↗
- Repozytorium
- kg-devkit ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 11.11.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 4
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 11.11.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Tworzy i sprawdza migrację bazy danych po zakończonej zmianie modelu, z konfiguracją mapowania, artefaktami i kontraktem API.
Oryginalny opis (EN)
Create and review a database migration for a finished model change (mapping configuration, generated model artifacts, permission chain, API contract) when the user explicitly invokes /add-migration.
Jak działa
SKILL.md bez nagłówków drugiego poziomu · 37 linii, 465 słów
Podgląd SKILL.md
--- name: add-migration description: Create and review a database migration for a finished model change (mapping configuration, generated model artifacts, permission chain, API contract) when the user explicitly invokes /add-migration. --- # Add a migration When the user invokes `$add-migration <Name>`, turn the schema change into a migration named `<Name>`. The repo's `AGENTS.md`/`CLAUDE.md` limits and its `Project profile` apply (the `Persistence` entry gives the migration command, migrations directory, naming and conventions). This skill grants NO authority to apply the migration to a database, commit, push or deploy. The profile may add limits; it cannot remove a limit stated in this skill. Without a Persistence entry, find the ORM's migration tooling in the repo and ask the user to confirm the command before running it. 1. **Scope.** `git status --short`; preserve the user's changes. Read the changed entities and their mapping configuration. Use a similar existing migration in the migrations directory as the example. 2. **Finish the model, then generate.** Do not generate before entity and configuration are done. Check the profile's conventions: base entity (tenant/soft-delete filters), unique indexes with the soft-delete filter, plain-key reference validation, money/decimal rules. Add no default rows to lookup/reference data unless the user asked. 3. **Generate.** Verify the command via the profile's help, then use the profile's migration command with a name that follows existing naming (`Add…`/`Change…`). Prefer the project's wrapper over raw tool calls, since wrappers often clean stray folders. 4. **Inspect the output.** The migration and the generated model artifacts the profile lists (EF Core: designer and model snapshot) must change together. `Up` must contain only the intended difference (unrelated column/index changes mean the model needs another look). Assess schema reversal and data restoration separately: recreating a dropped column does not restore its values. Document lossy or irreversible `Up`/`Down` operations and follow the profile's rollback policy; never claim data recovery without evidence. For data-transforming migrations, record effects on existing rows (default, NULL, index build time). 5. **Permissions**, if the change adds one: follow the profile's chain (constant and catalog, permission seed, migration, read-only role lists, frontend permission codes). 6. **Contract.** If DTOs/endpoints changed too, regenerate the API types/OpenAPI with the profile's command; the generated files belong in the commit. 7. **Verify.** Build the backend and run the focused tests for the area (schema tests may need Docker). Apply the migration to the local database ONLY if the user asks. Never reset the database. 8. **Gate.** Use the profile's `Finish gate` as the source of reviewer names and triggers (including schema, migration and permission/tenant changes); if the profile has no gate, read `references/finish-gate-default.md` and use its table. Pass the evidence as `references/review-packet.md` describes. Ambiguous gate rules must be clarified before declaring verification complete. Required review that is unavailable, FAIL or UNCLEAR blocks a verified handoff; do not invent a passing verdict. 9. **Report** (profile's report language): migration name and files, `Up`/`Down` summary, effect on existing data, commands run and counts, checks that could not run (for example no Docker), reviewer verdicts.
Pliki w paczce (4)
- SKILL.md 3 KB
- agents/openai.yaml 1 KB
- references/finish-gate-default.md 2 KB
- references/review-packet.md 2 KB
Wersje
| Repozytorium | Wynik | Licencja |
|---|---|---|
| Ta strona · kadirguloglu/kg-devkit | 96 | MIT |
| artk0de/tearags-mcp | 100 | MIT |
| KyRocks19/divination-station-takeoff | 100 | AGPL-3.0 |
| kadirguloglu/kg-devkit | 96 | MIT |
Migawka bazy z 13.11.2026 · wersja paczki f1f439de9d7a (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 95database-migration
Tworzy migrację bazy danych ze zmianami schematu i wycofaniem, gdy trzeba dodać tabelę albo zmodyfikować schemat. - 90create-migration
Tworzy nowy plik migracji bazy MySQL OWID dla zmiany schematu bazy danych. - 100prisma-migration
Tworzy modele schematu Prisma i generuje migracje bazy danych na podstawie modelu encji. - 100migration-safety-checker
Sprawdza, czy migracje bazy danych są bezpieczne dla produkcji, przy tworzeniu migracji, zmianie pól modeli, zmianie nazwy kolumny i innych zmianach schematu. - 90Create database migration
Tworzy migrację bazy danych MySQL w Ghost: dodanie tabeli lub kolumn, ustawienia, indeksy i aktualizacje danych, z plikiem migracji w schema.js i knex-migrator. - 100backend-migration-writer
Pisze bezpieczną, odwracalną migrację bazy danych: pliki up i down, plan uzupełnienia danych, analiza budżetu blokad i strategia wycofania.