test(better auth): implementation start of better auth
This commit is contained in:
9
migrations/0005_gorgeous_purple_man.sql
Normal file
9
migrations/0005_gorgeous_purple_man.sql
Normal 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");
|
||||
Reference in New Issue
Block a user