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
Using npx drizzle-kit generate.
Generated SQL, does not contain score constraint:
CREATETABLEIF NOT EXISTS "pandorasdb_report" (
"id"varchar(255) PRIMARY KEYNOT NULL,
"game_id"integerNOT NULL,
"user_id"varchar(255) NOT NULL,
"score"integer
);
--> statement-breakpoint
DO $$ BEGINALTERTABLE"pandorasdb_report" ADD CONSTRAINT"pandorasdb_report_game_id_pandorasdb_game_id_fk"FOREIGN KEY ("game_id") REFERENCES"public"."pandorasdb_game"("id") ON DELETE no action ONUPDATE no action;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
DO $$ BEGINALTERTABLE"pandorasdb_report" ADD CONSTRAINT"pandorasdb_report_user_id_pandorasdb_user_id_fk"FOREIGN KEY ("user_id") REFERENCES"public"."pandorasdb_user"("id") ON DELETE no action ONUPDATE no action;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
(The tables use the prefix "pandorasdb")
The text was updated successfully, but these errors were encountered:
Report hasn't been filed before.
What version of
drizzle-orm
are you using?0.36.1
What version of
drizzle-kit
are you using?0.28.0
Other packages
No response
Describe the Bug
Check constraints are not being generated when using drizzle with postgress.
Respective docs: https://orm.drizzle.team/docs/indexes-constraints#check
Schema:
Using
npx drizzle-kit generate
.Generated SQL, does not contain score constraint:
(The tables use the prefix "pandorasdb")
The text was updated successfully, but these errors were encountered: