Initial Commit
This commit is contained in:
2
migrations/20241009121432_user.down.sql
Normal file
2
migrations/20241009121432_user.down.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
-- Add migration script here
|
||||
DROP TABLE "users";
|
13
migrations/20241009121432_user.up.sql
Normal file
13
migrations/20241009121432_user.up.sql
Normal file
@@ -0,0 +1,13 @@
|
||||
-- Add migration script here
|
||||
CREATE TABLE "users" (
|
||||
"id" uuid NOT NULL,
|
||||
"email" text NOT NULL,
|
||||
"password" text NOT NULL,
|
||||
"verified" boolean DEFAULT false NOT NULL,
|
||||
"created_at" timestamp DEFAULT CURRENT_TIMESTAMP,
|
||||
"updated_at" timestamp DEFAULT CURRENT_TIMESTAMP,
|
||||
CONSTRAINT "users_email_key" UNIQUE ("email"),
|
||||
CONSTRAINT "users_pkey" PRIMARY KEY ("id")
|
||||
) WITH (oids = false);
|
||||
|
||||
CREATE INDEX "users_email_idx" ON "users" USING btree ("email");
|
2
migrations/20241009170101_activation_token.down.sql
Normal file
2
migrations/20241009170101_activation_token.down.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
-- Add down migration script here
|
||||
DROP TABLE "activation_token";
|
8
migrations/20241009170101_activation_token.up.sql
Normal file
8
migrations/20241009170101_activation_token.up.sql
Normal file
@@ -0,0 +1,8 @@
|
||||
-- Add up migration script here
|
||||
CREATE TABLE "activation_token" (
|
||||
"user_id" uuid NOT NULL,
|
||||
"token" character varying(255) NOT NULL,
|
||||
"created_at" timestamp DEFAULT CURRENT_TIMESTAMP,
|
||||
"updated_at" timestamp DEFAULT CURRENT_TIMESTAMP,
|
||||
CONSTRAINT "activation_token_user_id_token" PRIMARY KEY ("user_id", "token")
|
||||
) WITH (oids = false);
|
2
migrations/20241011204946_forgot_password.down.sql
Normal file
2
migrations/20241011204946_forgot_password.down.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
-- Add down migration script here
|
||||
DROP TABLE "forgot_password";
|
8
migrations/20241011204946_forgot_password.up.sql
Normal file
8
migrations/20241011204946_forgot_password.up.sql
Normal file
@@ -0,0 +1,8 @@
|
||||
-- Add up migration script here
|
||||
CREATE TABLE "forgot_password" (
|
||||
"user_id" uuid NOT NULL,
|
||||
"token" character varying(255) NOT NULL,
|
||||
"created_at" timestamp DEFAULT CURRENT_TIMESTAMP,
|
||||
"updated_at" timestamp DEFAULT CURRENT_TIMESTAMP,
|
||||
CONSTRAINT "forgot_password_user_id_token" PRIMARY KEY ("user_id", "token")
|
||||
) WITH (oids = false);
|
Reference in New Issue
Block a user