-
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
Showing
27 changed files
with
2,377 additions
and
561 deletions.
There are no files selected for viewing
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,14 @@ | ||
//drizzle.config.ts | ||
import type { Config } from "drizzle-kit" | ||
import { config } from "dotenv" | ||
|
||
config({ path: ".dev.vars" }) | ||
|
||
export default { | ||
schema: "./src/db/schema.ts", | ||
out: "./drizzle", | ||
dialect: "postgresql", | ||
dbCredentials: { | ||
url: process.env.DATABASE_URL || "", | ||
}, | ||
} satisfies Config |
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,65 @@ | ||
CREATE TABLE IF NOT EXISTS "Album" ( | ||
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, | ||
"title" text NOT NULL, | ||
"cover" text, | ||
"url" text, | ||
"slogan" text, | ||
"digitalDownloads" numeric, | ||
"createdAt" timestamp DEFAULT now() NOT NULL, | ||
"updatedAt" timestamp DEFAULT now() NOT NULL | ||
); | ||
--> statement-breakpoint | ||
CREATE TABLE IF NOT EXISTS "Permission" ( | ||
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, | ||
"name" text NOT NULL, | ||
"description" text DEFAULT '' NOT NULL, | ||
"createdAt" timestamp DEFAULT now() NOT NULL, | ||
"updatedAt" timestamp DEFAULT now() NOT NULL | ||
); | ||
--> statement-breakpoint | ||
CREATE TABLE IF NOT EXISTS "Role" ( | ||
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, | ||
"name" text NOT NULL, | ||
"description" text DEFAULT '' NOT NULL, | ||
"createdAt" timestamp DEFAULT now() NOT NULL, | ||
"updatedAt" timestamp DEFAULT now() NOT NULL | ||
); | ||
--> statement-breakpoint | ||
CREATE TABLE IF NOT EXISTS "Task" ( | ||
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, | ||
"title" text NOT NULL, | ||
"status" text NOT NULL, | ||
"label" text NOT NULL, | ||
"priority" text NOT NULL, | ||
"createdAt" timestamp DEFAULT now() NOT NULL, | ||
"updatedAt" timestamp DEFAULT now() NOT NULL | ||
); | ||
--> statement-breakpoint | ||
CREATE TABLE IF NOT EXISTS "TeamUser" ( | ||
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, | ||
"name" text NOT NULL, | ||
"email" text, | ||
"avatar" text, | ||
"status" text NOT NULL, | ||
"role" text NOT NULL, | ||
"bio" text, | ||
"amount" numeric NOT NULL, | ||
"createdAt" timestamp DEFAULT now() NOT NULL, | ||
"updatedAt" timestamp DEFAULT now() NOT NULL | ||
); | ||
--> statement-breakpoint | ||
CREATE TABLE IF NOT EXISTS "User" ( | ||
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, | ||
"email" text NOT NULL, | ||
"username" text, | ||
"name" text, | ||
"avatar" text, | ||
"birthdate" text, | ||
"bio" text, | ||
"password" text NOT NULL, | ||
"registeredAt" timestamp DEFAULT now() NOT NULL, | ||
"createdAt" timestamp DEFAULT now() NOT NULL, | ||
"updatedAt" timestamp DEFAULT now() NOT NULL, | ||
CONSTRAINT "User_email_unique" UNIQUE("email"), | ||
CONSTRAINT "User_username_unique" UNIQUE("username") | ||
); |
Oops, something went wrong.