howmuch/migrations/20241004191351_create_user_table.postgres.up.sql
2024-10-04 21:21:03 +02:00

15 lines
513 B
SQL

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);