From 1c32e1497525bc6f609898f0f79bd6cc3e6d92fb Mon Sep 17 00:00:00 2001
From: Alexander Kavon <hawk@alexkavon.com>
Date: Wed, 29 Nov 2023 02:05:38 -0500
Subject: user create/insert into users table, pgxpool defer moved to top of
 app, me.tmpl.html, secret hashing with argon2id, updated migrations

---
 migrations/002_create_users_table.sql | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

(limited to 'migrations/002_create_users_table.sql')

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()
 );
-- 
cgit v1.2.3

