From e488757455e888c5e4acdd9879fa8ee16c984b7e Mon Sep 17 00:00:00 2001 From: boyska Date: Sat, 29 Sep 2018 21:55:45 +0200 Subject: [PATCH] change schema: date_created -> created but really, it should be on a separate table --- db/db.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/db.go b/db/db.go index a953ecf..98bc6aa 100644 --- a/db/db.go +++ b/db/db.go @@ -13,7 +13,7 @@ type User struct { ID string `sql:"uid"` Name string `sql:"username"` Email string `sql:"email"` - DateCreated string `sql:"date_created"` + DateCreated string `sql:"created"` PasswordHash string `sql:"password"` } @@ -44,7 +44,7 @@ func (db *DB) Setup() error { uid UUID PRIMARY KEY DEFAULT uuid_generate_v4(), username varchar(64) UNIQUE NOT NULL, email varchar(100) UNIQUE NOT NULL, - date_created TIMESTAMPTZ NOT NULL DEFAULT NOW(), + created TIMESTAMPTZ NOT NULL DEFAULT NOW(), password varchar(256) NOT NULL )`) if err != nil {