Remove id autogeneration from db models
Remove automatic uuid v4 ID generation from the models and replace it with `shared.NewId()`, which generates an Id depending on the config setting
This commit is contained in:
parent
412a8be600
commit
e182949a8d
9 changed files with 24 additions and 12 deletions
|
@ -14,7 +14,7 @@ type AccessToken struct {
|
|||
User User // The account the token belongs to
|
||||
UserId string
|
||||
// The token itself is a uuid value
|
||||
Token string `gorm:"primarykey;type:uuid;default:gen_random_uuid()"`
|
||||
Token string `gorm:"primarykey"`
|
||||
Name string // Token name will be empty if autogenerated with sucessful login
|
||||
// Every token expires, even if set to "not expire". If set to "not expire", it just expires
|
||||
// at a point in the future this server should never reach
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue