feat: setup better-auth

This commit is contained in:
Henry
2025-05-02 23:40:34 +01:00
parent 5996ad19c3
commit 091fea6f38
23 changed files with 4696 additions and 30 deletions

View File

@@ -0,0 +1,8 @@
ALTER TABLE "apikey" RENAME TO "apiKey";--> statement-breakpoint
ALTER TABLE "apiKey" DROP CONSTRAINT "apikey_userId_user_id_fk";
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "apiKey" ADD CONSTRAINT "apiKey_userId_user_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."user"("id") ON DELETE cascade ON UPDATE no action;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;