1
0
Fork 0
forked from boyska/feedpanel

change schema: date_created -> created

but really, it should be on a separate table
This commit is contained in:
boyska 2018-09-29 21:55:45 +02:00
parent 9e911272af
commit e488757455

View file

@ -13,7 +13,7 @@ type User struct {
ID string `sql:"uid"` ID string `sql:"uid"`
Name string `sql:"username"` Name string `sql:"username"`
Email string `sql:"email"` Email string `sql:"email"`
DateCreated string `sql:"date_created"` DateCreated string `sql:"created"`
PasswordHash string `sql:"password"` PasswordHash string `sql:"password"`
} }
@ -44,7 +44,7 @@ func (db *DB) Setup() error {
uid UUID PRIMARY KEY DEFAULT uuid_generate_v4(), uid UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
username varchar(64) UNIQUE NOT NULL, username varchar(64) UNIQUE NOT NULL,
email varchar(100) 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 password varchar(256) NOT NULL
)`) )`)
if err != nil { if err != nil {