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
|
@ -7,10 +7,10 @@ import (
|
|||
)
|
||||
|
||||
type Visit struct {
|
||||
ID int
|
||||
Downloads int `sql:",notnull"`
|
||||
Views int `sql:",notnull"`
|
||||
BookID string
|
||||
ID int `sql:"type:serial"`
|
||||
Downloads int `sql:"type:integer,notnull"`
|
||||
Views int `sql:"type:integer,notnull"`
|
||||
BookID string `sql:"type:varchar(16),unique"`
|
||||
Book *Book
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue