test(better auth): implementation start of better auth

This commit is contained in:
2025-09-19 22:23:32 -05:00
parent 6c56dfa810
commit 6faee89b25
37 changed files with 3433 additions and 16 deletions

View File

@@ -0,0 +1,9 @@
CREATE TABLE "user_role" (
"user_role_id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"user_id" text NOT NULL,
"module" text NOT NULL,
"role" text NOT NULL
);
--> statement-breakpoint
ALTER TABLE "user_role" ADD CONSTRAINT "user_role_user_id_user_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."user"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
CREATE UNIQUE INDEX "unique_user_module" ON "user_role" USING btree ("user_id","module");