Skip to content

docs: stamp new migrations after 0038 until its date passes - #187

Merged
TheGreatAxios merged 1 commit into
mainfrom
cl-12148-keep-the-next-migration-from-being-skipped-after-the
Nov 5, 2026
Merged

TheGreatAxios merged 1 commit into
mainfrom
cl-12148-keep-the-next-migration-from-being-skipped-after-the

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Contributor

Adds a Migrations section to docs/DEV.md. Create migrations with bun run db:generate, and never move a merged when. Until 8 November 2026 01:06:40 UTC, a generated migration sorts before 0038, so set its when to one more than the previous entry's. 0038's stamp is unchanged, because databases that applied it keep that value.

Fixes CL-12148.

Verification

Against throwaway Postgres databases, with apps/hub/src/migrate.ts:

  • Fresh database: all 39 product migrations run.
  • Database migrated to 0036 without 0037: 0038 runs and creates sb_approval_round.
  • Probe 0039 stamped one past 0038: runs on a database that already has 0038.
  • Probe 0039 stamped with the current clock: migrate.test.ts fails.

bun run lint, format:check, typecheck, test, pins:verify and vendor:verify pass.

0038 is stamped 8 November 2026 and databases that applied it keep that stamp, so it stays. Until then, a generated migration sorts before it and needs its stamp set one past the previous entry's.
@linear-code

linear-code Bot commented Nov 5, 2026

Copy link
Copy Markdown

CL-12148

@TheGreatAxios
TheGreatAxios marked this pull request as ready for review November 5, 2026 01:50
@corbits-triage

corbits-triage Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Triage: Pass

No changes needed from you. A maintainer will review this pull request.

@corbits-triage corbits-triage Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No defects reported.

@TheGreatAxios
TheGreatAxios added this pull request to the merge queue Nov 5, 2026
Merged via the queue into main with commit 8a26cb6 Nov 5, 2026
9 checks passed
@TheGreatAxios
TheGreatAxios deleted the cl-12148-keep-the-next-migration-from-being-skipped-after-the branch November 5, 2026 01:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant