feat: db init
This commit is contained in:
parent
0b1cbef59e
commit
a6fc74e851
23 changed files with 1536 additions and 5553 deletions
21
packages/db/supabase/migrations/0000_awesome_prowler.sql
Normal file
21
packages/db/supabase/migrations/0000_awesome_prowler.sql
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
CREATE TABLE "products" (
|
||||
"id" serial PRIMARY KEY NOT NULL,
|
||||
"name" text NOT NULL,
|
||||
"description" text,
|
||||
"price" numeric(10, 2) NOT NULL,
|
||||
"image_url" text,
|
||||
"is_published" boolean DEFAULT false,
|
||||
"updated_at" timestamp with time zone NOT NULL,
|
||||
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
||||
"deleted_at" timestamp with time zone
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE TABLE "users" (
|
||||
"id" text PRIMARY KEY NOT NULL,
|
||||
"email" text NOT NULL,
|
||||
"name" text,
|
||||
"role" text DEFAULT 'user' NOT NULL,
|
||||
"updated_at" timestamp with time zone NOT NULL,
|
||||
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
||||
"deleted_at" timestamp with time zone
|
||||
);
|
||||
Loading…
Add table
Add a link
Reference in a new issue