nest_scaffold/database/migrations/2023.02.22T05.24.58.create_users.sql

20 lines
487 B
MySQL
Raw Normal View History

2023-02-24 15:25:06 +07:00
CREATE TABLE "users" (
"id" VARCHAR PRIMARY KEY,
"phone_number" TEXT NOT NULL UNIQUE,
"email" TEXT NOT NULL UNIQUE,
2023-02-26 16:08:28 +07:00
"password" TEXT NOT NULL,
2023-02-24 15:25:06 +07:00
"fullname" TEXT,
"avatar" TEXT,
"latitude" TEXT,
"longitude" TEXT,
"auth_token" TEXT,
"verify_token" TEXT,
"fcm_token" TEXT,
"is_verified" TEXT,
"is_merchant" BOOLEAN,
2023-02-26 16:08:28 +07:00
"role_id" INT,
2023-02-24 15:25:06 +07:00
"created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
"updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now()
)