Create tables, indexes, functions and triggers programatically
This commit is contained in:
parent
cc12981a50
commit
c9b967a2ef
7 changed files with 154 additions and 163 deletions
|
@ -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 {
|
||||
|
|
Reference in a new issue