wp-safe-migration
/wp-safe-migration
Pisze bezpieczne zmiany schematu bazy i migracje danych dla wtyczek WordPress: wersjonowane, idempotentne i z planem wycofania.
- Autor
- addblack ↗
- Repozytorium
- wp-sdlc-kit ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 27.10.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 27.10.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
Pisze bezpieczne zmiany schematu bazy i migracje danych dla wtyczek WordPress: wersjonowane, idempotentne i z planem wycofania.
Oryginalny opis (EN)
Write safe database schema changes and data migrations for WordPress plugins/themes - versioned, idempotent, batched, with a rollback plan. Use when changing custom tables, options or post meta structure, or backfilling data.
Jak działa
- Principles
- Steps to follow
Podgląd SKILL.md
---
name: wp-safe-migration
description: Write safe database schema changes and data migrations for WordPress plugins/themes - versioned, idempotent, batched, with a rollback plan. Use when changing custom tables, options or post meta structure, or backfilling data.
---
# Safe WordPress migrations
## Principles
- Versioned: store `{prefix}_db_version`. On `plugins_loaded` (or `admin_init`), compare with the code version and run only the missing migrations, in order.
- Idempotent: running a migration twice must not break anything or duplicate data. Check before you write.
- Schema via `dbDelta()` (exact formatting rules apply: two spaces after `PRIMARY KEY`, one field per line). Never `DROP` in the same release that stops using a column - drop in a later release.
- Large data: process in batches (for example 200 rows), store a cursor, continue via Action Scheduler or WP-Cron. Never loop over all posts in one request.
- Multisite: run per blog or network-wide on purpose, not by accident.
- Always take a backup before running on production (`wp db export`). State how to roll back in the PR.
## Steps to follow
1. Describe the change and the old/new shape of the data.
2. Write the migration as a class with `version()`, `up()` and, where possible, `down()`. Register it in an ordered list.
3. Add a PHPUnit test that creates old-shape data, runs `up()` twice, and asserts the result.
4. Add a dry-run mode (log what would change) usable from WP-CLI: `wp yourprefix migrate --dry-run`.
5. Note the deploy order in the PR description: code first or migration first, and whether the site must be in maintenance mode.
Wersje
W bazie nie ma innych skilli o nazwie wp-safe-migration.
Migawka bazy z 13.11.2026 · wersja paczki 296c128b4b8b (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
- 100database-migrations
Planuje i pisze migracje schematu bez przestojów: etapowe zmiany, bezpieczne indeksy, partie uzupełniania danych i plan wycofania. - 90db-migration
Pisze bezpieczne migracje schematu i danych bez przestoju, z wypełnianiem partiami i planem wycofania. - 95memstack-development-migration-planner
Planuje bezpieczne zmiany schematu bazy danych bez przestojów i z planem wycofania zmian. - 100doctrine-migrations
Prowadzi zmiany schematu bazy w Symfony przez migracje Doctrine: generowanie, odwracalne up() i down(), migracje danych i zmiany bezpieczne przy wdrożeniu bez przestoju. - 100wp-migration-upgrade-review
Przegląda migracje bazy i procedury aktualizacji WordPressa: wersjonowanie opcji, backfille, zmiany schematu i ryzyko wycofania. - 100prisma-migration
Tworzy modele schematu Prisma i generuje migracje bazy danych na podstawie modelu encji.