You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And this query crashes because of constraint dbt_runs_dbt_project_id_dbt_branch_id_dbt_branches_dbt_project_ on table dbt_runs depends on index dbt_branches_dbt_project_id_id_pk'
I tried to run drop constraint cascade by my own and after that drizzle-kit push worked successfully. However if I run drizzle-kit push again (even without changes) the same error appears.
Expected behavior
I guess that drizzle-kit generate excess sql queries here, because this constraint already exists in my database.
ALTER TABLE "dbt_branches" DROP CONSTRAINT dbt_branches_dbt_project_id_id_pk;
--> statement-breakpoint
ALTER TABLE "dbt_branches" ADD CONSTRAINT dbt_branches_dbt_project_id_id_pk PRIMARY KEY(dbt_project_id,id);
Environment & setup
No response
The text was updated successfully, but these errors were encountered:
What version of
drizzle-orm
are you using?0.31.4
What version of
drizzle-kit
are you using?0.22.8
Describe the Bug
I use drizzle-orm with postgres on my project. I have the table with composite primary key like that
Also there's the table with multicolumn foreign key that relate to dbtBranches.
When I run drizzle-kit push, it generates the query with
And this query crashes because of
constraint dbt_runs_dbt_project_id_dbt_branch_id_dbt_branches_dbt_project_ on table dbt_runs depends on index dbt_branches_dbt_project_id_id_pk'
I tried to run drop constraint cascade by my own and after that
drizzle-kit push
worked successfully. However if I rundrizzle-kit push
again (even without changes) the same error appears.Expected behavior
I guess that drizzle-kit generate excess sql queries here, because this constraint already exists in my database.
Environment & setup
No response
The text was updated successfully, but these errors were encountered: