21 lines
662 B
SQL
21 lines
662 B
SQL
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
|
|
);
|