← ClaudeAtlas

unioss-bump-migrationlisted

Use when bumping a UNIOSS migration timestamp, reindexing files, and updating the migration config and tests.
ttncode/unioss-plugins · ★ 0 · AI & Automation · score 72
Install: claude install-skill ttncode/unioss-plugins
# UNIOSS Migration Bumper ## Overview Move a set of migrations — plus their configs and tests — from an old timestamp to a new one. **Core principle:** reindex from the current active sequence, never the directory's absolute max index. **Track progress:** create a todo per Workflow step below and check each off as you complete it. ## Input - **OLD_TS** — 14-digit timestamp of the target migrations (e.g. `20260114101209`). - **NEW_TS** — 14-digit replacement timestamp. From the user, or `date +"%Y%m%d%H%M%S"`. ### Locations - **Migrations** — `AdminPage/application/migrations/{production,staging,testing,virtualbox_direct_domain}/` - Format: `<TS>_<action>_<ticket>_<index>.php` - **Configs** — `AdminPage/application/config/{production,staging,virtualbox_direct_domain}/migration.php` - **Tests** — `AdminPage/application/tests/migrations/Migration_<TS>_test.php` ## Workflow ### A. Rename & update migrations 1. Find all PHP files starting with `OLD_TS_`. 2. **Reindex.** Calculate a `NEW_INDEX` for each file: unique, monotonically increasing (e.g. `001`, `002`), greater than the index of the **most recent migration** (highest timestamp) in that environment's folder. **CRITICAL:** do not use the absolute maximum index in the directory — some folders hold outlier files with very high indices (e.g. `1471`) left by much older timestamps. Always sort by timestamp first to find the current active sequence index. 3. **Rename.** Replace `OLD_TS` with `NEW_TS` and update th