db: create user table
This commit is contained in:
@ -0,0 +1,3 @@
|
||||
DROP TABLE IF EXISTS "user";
|
||||
DROP SEQUENCE IF EXISTS user_id_seq;
|
||||
|
14
migrations/20241004191351_create_user_table.postgres.up.sql
Normal file
14
migrations/20241004191351_create_user_table.postgres.up.sql
Normal file
@ -0,0 +1,14 @@
|
||||
CREATE SEQUENCE user_id_seq INCREMENT 1 MINVALUE 1 MAXVALUE 2147483647 CACHE 1;
|
||||
|
||||
CREATE TABLE "public"."user" (
|
||||
"id" integer DEFAULT nextval('user_id_seq') NOT NULL,
|
||||
"email" character varying(255) NOT NULL UNIQUE,
|
||||
"first_name" character varying(255) NOT NULL,
|
||||
"last_name" character varying(255) NOT NULL,
|
||||
"password" character varying(60) NOT NULL,
|
||||
"created_at" timestamp NOT NULL,
|
||||
"updated_at" timestamp NOT NULL,
|
||||
CONSTRAINT "user_pkey" PRIMARY KEY ("id")
|
||||
) WITH (oids = false);
|
||||
|
||||
|
Reference in New Issue
Block a user