This commit is contained in:
2019-10-06 20:58:13 +02:00
parent b4f707da19
commit 857562c0eb
17 changed files with 478 additions and 34 deletions

View File

@@ -0,0 +1,9 @@
CREATE TABLE users (
id integer GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
email text NOT NULL UNIQUE,
encrypted_password text NOT NULL,
created_at timestamptz NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at timestamptz NOT NULL DEFAULT CURRENT_TIMESTAMP
);
CREATE TRIGGER set_users_updated BEFORE UPDATE ON users FOR EACH ROW EXECUTE PROCEDURE set_updated_timestamp();