Document prod schema migrate before restore and i18n search index fix.

Release runbook now describes default migrateProdSchema, auto-migrate safety guard, and troubleshooting for updated_at restore failures; i18n docs cover partial entity_translations index.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Danila Khodjaef
2026-07-15 12:21:53 +03:00
co-authored by Cursor
parent a2c27ea526
commit 62d7ebbe6a
5 changed files with 18 additions and 13 deletions
+8 -5
View File
@@ -79,19 +79,22 @@ API (curator-only): see [API.md](API.md#translations-curator).
Public endpoints accept `?locale=ru` or `Accept-Language: ru`. Responses include `"locale": "ru"` on catalog payloads; field names unchanged — values are already resolved.
Search matches canonical text **or** published Russian aliases.
Search matches canonical text **or** published Russian **name** / **title** aliases (partial index `entity_translations_search_alias_idx`; long `bio_full` text is stored but not btree-indexed).
---
## Prod rollout
1. `npm run dev:migrate` on dev; prod schema: `npm run harmonize:schema` (dev → prod only)
2. Seed Russian on dev: `npm run dev:fetch-artist-bios-ru`
3. Curator review + publish
4. `npm run harmonize` to sync `entity_translations` to prod (or full promote if preferred)
1. `npm run dev:migrate` on dev; curator review + publish Russian rows on dev
2. **`npm run devtoprod:release`** (`full` profile) — includes Step 4 schema migrate + Step 5 restore; or `npm run harmonize:schema` then harmonize/sync if you prefer merge over full promote
3. After restore, verify locale toggle on https://gallery.mysuperlab.netcraze.pro
`entity_translations` is included in [`harmonize-db.js`](../scripts/harmonize-db.js) catalog sync.
### `dev:fetch-artist-bios-ru` index limit
Early `migrate-i18n.sql` indexed all `value` text; very long Russian bios (e.g. Michelangelo) could fail with `index row size … exceeds btree maximum`. Current migration uses a **partial** index on `name` and `title` only (`char_length(value) <= 512`). Re-run `npm run dev:migrate` (or prod Step 4) after pulling this fix, then re-run `npm run dev:fetch-artist-bios-ru` for any artists that failed.
---
## npm scripts