Initialize database structure

This commit is contained in:
2023-05-24 13:52:24 +02:00
parent 6a265d9a72
commit df64d51445
12 changed files with 532 additions and 1 deletions

View File

@ -0,0 +1,2 @@
-- This file should undo anything in `up.sql`
DROP table users;

View File

@ -0,0 +1,12 @@
-- Create table
CREATE TABLE users (
id SERIAL PRIMARY KEY,
email VARCHAR(255) NOT NULL,
password VARCHAR NULL,
reset_password_token VARCHAR(150) NULL,
time_create BIGINT NOT NULL,
time_gen_reset_token BIGINT NOT NULL DEFAULT 0,
time_activate BIGINT NOT NULL DEFAULT 0,
active BOOLEAN NOT NULL DEFAULT TRUE,
admin BOOLEAN NOT NULL DEFAULT FALSE
)