Add dedicated Drizzle config files for sqlite and postgres and generate new migration outputs for each dialect. Update migrate scripts to load env files and auto-pick the correct config unless explicitly provided, and tighten API auth handling by using shared auth context helpers and enforcing userId checks when auth is enabled.
6 lines
534 B
SQL
6 lines
534 B
SQL
ALTER TABLE "account" DROP CONSTRAINT "account_user_id_user_id_fk";
|
|
--> statement-breakpoint
|
|
ALTER TABLE "session" DROP CONSTRAINT "session_user_id_user_id_fk";
|
|
--> statement-breakpoint
|
|
ALTER TABLE "account" ADD CONSTRAINT "account_user_id_user_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."user"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
ALTER TABLE "session" ADD CONSTRAINT "session_user_id_user_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."user"("id") ON DELETE cascade ON UPDATE no action;
|