Open mitchellwarr opened 2 weeks ago
drizzle-orm
0.31.2
drizzle-kit
0.22.7
Running a migration with composite primary keys will break.
In drizzle-kit bin.cjs the issue sits with
prepareDeleteCompositePrimaryKeyPg = (tableName, schema5, pks, json1) => { return Object.values(pks).map((it) => { return { type: "delete_composite_pk", tableName, data: it, schema: schema5, constraintName: json1.tables[`${schema5}.${tableName}`].compositePrimaryKeys[PgSquasher.unsquashPK(it).name].name }; }); };
The issue is schema5 is undefined leading to json1.tables['.table'] instead of json1.tables['public.table']
json1.tables['.table']
json1.tables['public.table']
You should be able to generate migrations when your table has composite primary keys
No response
please check drizzle-kit@0.22.8, should have the fix for that
drizzle-kit@0.22.8
What version of
drizzle-orm
are you using?0.31.2
What version of
drizzle-kit
are you using?0.22.7
Describe the Bug
Running a migration with composite primary keys will break.
In drizzle-kit bin.cjs the issue sits with
The issue is schema5 is undefined leading to
json1.tables['.table']
instead ofjson1.tables['public.table']
Expected behavior
You should be able to generate migrations when your table has composite primary keys
Environment & setup
No response