feat: initial commit
This commit is contained in:
commit
e54dee08c8
29 changed files with 4857 additions and 0 deletions
17
drizzle/0000_outgoing_magneto.sql
Normal file
17
drizzle/0000_outgoing_magneto.sql
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
CREATE TABLE "role_members" (
|
||||
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
||||
"role_id" uuid,
|
||||
"user_id" bigint NOT NULL,
|
||||
"created_at" timestamp DEFAULT now() NOT NULL
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE TABLE "roles" (
|
||||
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
||||
"slug" varchar(32) NOT NULL,
|
||||
"aliases" varchar(32)[] DEFAULT '{}' NOT NULL,
|
||||
"chat_id" bigint NOT NULL,
|
||||
"created_at" timestamp DEFAULT now() NOT NULL,
|
||||
"updated_at" timestamp DEFAULT now() NOT NULL
|
||||
);
|
||||
--> statement-breakpoint
|
||||
ALTER TABLE "role_members" ADD CONSTRAINT "role_members_role_id_roles_id_fk" FOREIGN KEY ("role_id") REFERENCES "public"."roles"("id") ON DELETE no action ON UPDATE no action;
|
||||
Loading…
Add table
Add a link
Reference in a new issue