generated from Kan-A-Pesh/express-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f2c91dd
commit 54eb454
Showing
9 changed files
with
458 additions
and
16 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
CREATE TABLE IF NOT EXISTS "acquired" ( | ||
"user_uuid" uuid PRIMARY KEY NOT NULL, | ||
"challenge_id" serial PRIMARY KEY NOT NULL, | ||
"created_by" serial NOT NULL, | ||
"updated_at" timestamp DEFAULT now() NOT NULL, | ||
"created_at" timestamp DEFAULT now() NOT NULL | ||
); | ||
--> statement-breakpoint | ||
CREATE TABLE IF NOT EXISTS "challenges" ( | ||
"id" serial PRIMARY KEY NOT NULL, | ||
"club_id" serial NOT NULL, | ||
"score" integer NOT NULL, | ||
"name" text NOT NULL, | ||
"updated_at" timestamp DEFAULT now() NOT NULL, | ||
"created_at" timestamp DEFAULT now() NOT NULL | ||
); | ||
--> statement-breakpoint | ||
CREATE TABLE IF NOT EXISTS "clubs" ( | ||
"id" serial PRIMARY KEY NOT NULL, | ||
"avatar_url" text NOT NULL, | ||
"name" text NOT NULL, | ||
"description" text NOT NULL, | ||
"daily_date" date NOT NULL, | ||
"updated_at" timestamp DEFAULT now() NOT NULL, | ||
"created_at" timestamp DEFAULT now() NOT NULL | ||
); | ||
--> statement-breakpoint | ||
CREATE TABLE IF NOT EXISTS "granters" ( | ||
"id" serial PRIMARY KEY NOT NULL, | ||
"club_id" serial NOT NULL, | ||
"email" text NOT NULL, | ||
"password" text NOT NULL | ||
); | ||
--> statement-breakpoint | ||
CREATE TABLE IF NOT EXISTS "users" ( | ||
"uuid" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, | ||
"club_id" serial NOT NULL, | ||
"email" text NOT NULL, | ||
"hashpass" text NOT NULL, | ||
"username" text NOT NULL, | ||
"quote" text, | ||
"updated_at" timestamp DEFAULT now() NOT NULL, | ||
"created_at" timestamp DEFAULT now() NOT NULL | ||
); | ||
--> statement-breakpoint | ||
CREATE UNIQUE INDEX IF NOT EXISTS "name_unique_idx" ON "clubs" USING btree ("name");--> statement-breakpoint | ||
CREATE UNIQUE INDEX IF NOT EXISTS "email_unique_idx" ON "users" USING btree ("email");--> statement-breakpoint | ||
CREATE UNIQUE INDEX IF NOT EXISTS "username_unique_idx" ON "users" USING btree ("username"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.