Create tables, indexes, functions and triggers programatically

This commit is contained in:
Las Zenow 2017-09-21 21:05:06 +00:00
parent cc12981a50
commit c9b967a2ef
7 changed files with 154 additions and 163 deletions

View file

@ -11,11 +11,11 @@ import (
)
type user struct {
ID int
Username string
ID int `sql:"type:serial"`
Username string `sql:"type:varchar(255),unique"`
Password []byte
Salt []byte
Role string
Role string `sql:"type:varchar(255)"`
}
func (db *pgDB) AddUser(name string, pass string) error {