Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/lucky-hats-attack.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"executor": patch
---

**Fix: the artifact migration no longer narrows `definition.name` to varchar(255), which failed on existing long definition names**
1 change: 0 additions & 1 deletion apps/cloud/drizzle/0013_curly_rocket_racer.sql
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@ CREATE TABLE "artifact" (
"subject" varchar(255) NOT NULL
);
--> statement-breakpoint
ALTER TABLE "definition" ALTER COLUMN "name" SET DATA TYPE varchar(255);--> statement-breakpoint
CREATE UNIQUE INDEX "artifact_uidx" ON "artifact" USING btree ("tenant","owner","subject","id");
2 changes: 1 addition & 1 deletion apps/cloud/drizzle/meta/0013_snapshot.json
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@
},
"name": {
"name": "name",
"type": "varchar(255)",
"type": "text",
"primaryKey": false,
"notNull": true
},
Expand Down
2 changes: 1 addition & 1 deletion apps/cloud/drizzle/meta/0014_snapshot.json
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@
},
"name": {
"name": "name",
"type": "varchar(255)",
"type": "text",
"primaryKey": false,
"notNull": true
},
Expand Down
2 changes: 1 addition & 1 deletion apps/cloud/drizzle/meta/0015_snapshot.json
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@
},
"name": {
"name": "name",
"type": "varchar(255)",
"type": "text",
"primaryKey": false,
"notNull": true
},
Expand Down
2 changes: 1 addition & 1 deletion apps/cloud/src/db/executor-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ export const definition = pgTable(
integration: varchar("integration", { length: 255 }).notNull(),
connection: varchar("connection", { length: 255 }).notNull(),
plugin_id: text("plugin_id").notNull(),
name: varchar("name", { length: 255 }).notNull(),
name: text("name").notNull(),
schema: json("schema").notNull(),
created_at: timestamp("created_at").notNull(),
row_id: varchar("row_id", { length: 255 })
Expand Down
7 changes: 6 additions & 1 deletion packages/core/sdk/src/core-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,12 @@ export const coreTables = defineTables({
integration: keyColumn("integration"),
connection: keyColumn("connection"),
plugin_id: textColumn("plugin_id"),
name: keyColumn("name"),
// text, NOT keyColumn: $def names exceed 255 chars in production (deep
// OpenAPI component paths), and the live cloud column has been TEXT
// since the baseline was patched for it. A varchar(255) here re-emits a
// narrowing ALTER on every drizzle-kit generate, which fails on real
// rows (22001) — that drift broke cloud migration 0013 once already.
name: textColumn("name"),
schema: jsonColumn("schema"),
created_at: dateColumn("created_at"),
},
Expand Down
Loading