From 8efd98dbcf6588cfd7c4516026721fd24303709a Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 12 Oct 2026 18:35:06 +0000 Subject: [PATCH] docs(skills): require real creation timestamp on migrations Migration file/class timestamp must be the actual ms epoch at creation (date +%s%3N), never a rounded value or start-of-day. Synced skills and roadmap guideline from multi-repo-codespace. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01H8g3aaZW5h3k62HtJVwAsJ --- .github/skills/generate-migration/SKILL.md | 2 ++ .github/skills/yemot-integration/SKILL.md | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/skills/generate-migration/SKILL.md b/.github/skills/generate-migration/SKILL.md index f5209a85..bae02cbe 100644 --- a/.github/skills/generate-migration/SKILL.md +++ b/.github/skills/generate-migration/SKILL.md @@ -62,6 +62,8 @@ Always pass `-p` (pretty-print) so the generated SQL is readable instead of one NODE_ENV=development yarn typeorm:generate src/migrations/YourMigrationName -p ``` +**Timestamp must be the real current time.** The `` prefix in the file name (and the matching suffix on the class name) must be the actual millisecond epoch at creation — what `typeorm:generate`/`migration:create` write, or `date +%s%3N` when you name a file by hand (e.g. a data-only migration). Never use a rounded/made-up value (`1787100000000`), start-of-today midnight, or `+1` on the previous migration. TypeORM orders migrations by this number, so a fake one can sort before migrations already applied in production and get skipped or run out of order. It must also be greater than every existing migration's timestamp in `server/src/migrations/`. + **Check the generated file for noise.** If an existing entity has an index/column with no explicit name, TypeORM may compute a different auto-generated hash name than what's actually stored in the DB, and your migration will include an unrelated rename alongside your real change. Strip anything not related to what you changed. ## Step 5: Verify zero diff diff --git a/.github/skills/yemot-integration/SKILL.md b/.github/skills/yemot-integration/SKILL.md index 517e16c1..ffa94904 100644 --- a/.github/skills/yemot-integration/SKILL.md +++ b/.github/skills/yemot-integration/SKILL.md @@ -22,7 +22,7 @@ Shared code lives in `server/shared/utils/yemot/` (`nra-server`); each project s **Add/change a flow:** edit the project's `YemotHandlerService.processCall()` (and its private `process*Call()` helpers). Ask the user (via `this.read/send` helpers on the base) for input, validate, persist. Keep flow-specific logic in the project; only truly shared IVR mechanics go in `nra-server`. -**Menu texts** live in DB (`YemotCall`/yemot-texts) and are updated via migrations — see the `UpdateYemotTexts*` migrations in `react-admin-nestjs/server/src/migrations/`. Use `generate-migration` for schema/text changes. +**Menu texts** live in DB (`YemotCall`/yemot-texts) and are updated via migrations — see the `UpdateYemotTexts*` migrations in `react-admin-nestjs/server/src/migrations/`. Use `generate-migration` for schema/text changes; a hand-written text migration still needs a real `date +%s%3N` timestamp (see that skill). **File upload/download to Yemot:** paths must carry the `ivr2:` scheme prefix (a past bug shipped without it). `uploadFile`/`downloadFile`/`deleteFile` live in `utils/phone/yemot-api.service.ts` — reuse them, mind the auth and path prefix.