forked from boyska/feedpanel
change schema: date_created -> created
but really, it should be on a separate table
This commit is contained in:
parent
9e911272af
commit
e488757455
1 changed files with 2 additions and 2 deletions
4
db/db.go
4
db/db.go
|
@ -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 {
|
||||||
|
|
Loading…
Reference in a new issue