aboutsummaryrefslogtreecommitdiff
path: root/migrations
diff options
context:
space:
mode:
authorAlexander Kavon <hawk@alexkavon.com>2023-11-29 02:05:38 -0500
committerAlexander Kavon <hawk@alexkavon.com>2023-11-29 02:05:38 -0500
commit1c32e1497525bc6f609898f0f79bd6cc3e6d92fb (patch)
tree99abc1c2690b151bfb3d45e9f76a8770b3597e7a /migrations
parent5e26ebc96bd41f9d232573d873cb6cb55f0050c4 (diff)
user create/insert into users table, pgxpool defer moved to top of app, me.tmpl.html, secret hashing with argon2id, updated migrations
Diffstat (limited to 'migrations')
-rw-r--r--migrations/002_create_users_table.sql5
1 files changed, 3 insertions, 2 deletions
diff --git a/migrations/002_create_users_table.sql b/migrations/002_create_users_table.sql
index a561a05..d2322f9 100644
--- a/migrations/002_create_users_table.sql
+++ b/migrations/002_create_users_table.sql
@@ -1,7 +1,8 @@
CREATE TABLE users(
id SERIAL NOT NULL PRIMARY KEY,
- username VARCHAR(50) NOT NULL,
- secret VARCHAR(255) NOT NULL,
+ username VARCHAR(50) UNIQUE NOT NULL,
+ secret VARCHAR(256) NOT NULL,
+ email VARCHAR(256) UNIQUE NOT NULL,
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
);