Skip to content

Commit d01f22e

Browse files
committed
rename constraint fix
1 parent 9fb9814 commit d01f22e

3 files changed

Lines changed: 3 additions & 0 deletions

File tree

packages/orm-migrate/src/migrations/diff/diffSnapshots.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,7 @@ describe("diffSnapshots", () => {
738738
expect(ops).toContainEqual({
739739
type: "renameUniqueConstraint",
740740
schema: "app",
741+
table: "users",
741742
oldName: "users_email_key",
742743
newName: "users_email_unique",
743744
});

packages/orm-migrate/src/migrations/diff/diffSnapshots.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ const diffTable = (
244244
ops.push({
245245
type: "renameUniqueConstraint",
246246
schema,
247+
table,
247248
oldName: currentUc.name,
248249
newName: desiredUc.name,
249250
});

packages/orm-migrate/src/migrations/diff/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ export type SchemaDiffOperation =
7373
| {
7474
type: "renameUniqueConstraint";
7575
schema: string;
76+
table: string;
7677
oldName: string;
7778
newName: string;
7879
}

0 commit comments

Comments
 (0)