Files
vega-cloud/drizzle/1759370311_heavy_gressill.sql
T
2025-10-08 11:37:54 +07:00

17 lines
596 B
SQL

CREATE TYPE "public"."role" AS ENUM('admin', 'visitor', 'user');--> statement-breakpoint
CREATE TABLE "users" (
"id" "ulid" PRIMARY KEY DEFAULT gen_ulid() NOT NULL,
"name" varchar(255) NOT NULL,
"email" varchar(255),
"phone" varchar(255),
"password" varchar(127),
"image" text,
"google_id" varchar(255),
"role" "role" DEFAULT 'user' NOT NULL,
"status" boolean DEFAULT true NOT NULL,
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
"updated_at" timestamp with time zone NOT NULL,
"deleted_at" timestamp with time zone,
CONSTRAINT "users_email_unique" UNIQUE("email")
);