Drop the definition.name narrowing from the artifact migration - #1500
Merged
Conversation
RhysSullivan
marked this pull request as ready for review
July 29, 2026 21:25
Contributor
Cloudflare previewTorn down — the PR is closed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Main's Deploy has been red since #1472: migration 0013 includes
ALTER TABLE "definition" ALTER COLUMN "name" SET DATA TYPE varchar(255), and production has definition names longer than 255 chars, so the migration fails with 22001 and rolls back — 0013–0015 never applied, theartifacttable doesn't exist in prod, and Deploy cloud is skipped on every push (prod is still running pre-#1472 code).The ALTER is schema drift resurfacing, not an intentional change.
definition.namewas widened totextin June ("Allow long definition names in cloud schema", dd7aaf6) because $def names exceed 255, but only the baseline SQL/snapshot was patched — the fumadb source (core-schema.ts) keptkeyColumn→ varchar(255). #1251 hit the same drift and hand-dropped the ALTER from its migration; #1472'sdrizzle-kit generatediffed snapshot (text) against schema (varchar(255)) and faithfully re-emitted the narrowing.This ends the drift at the source:
core-schema.ts:definition.nameis nowtextColumn, with a comment explaining why it must never go back tokeyColumn.executor-schema.tsregenerated viadb:schema(only that one line changes).definition.namecorrected totextso future generates diff against reality.drizzle-kit generatenow reports no changes.Invariants and failure states considered:
text, rows > 255 chars, journal at 0012): fixed 0013–0015 apply cleanly; verified against PGlite seeded with a 400-char name — migrates,artifactcreated,namestaystext.name text, nothing alters it after.textsince June — the source now records that reality.Once merged, the Migrate job should stamp 0013–0015 and unblock Deploy cloud (which also needs Cloudflare's "Errors Deploying Workers Scripts" incident resolved).