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
|
@ -27,7 +27,7 @@ type User struct {
|
|||
// Same also applies for other types that use a UUID as primary key
|
||||
// TODO: Change this to generate via cuid or uuid, depending on config
|
||||
// Or remove autogeneration alltogether
|
||||
ID string `gorm:"primarykey;default:gen_random_uuid()"`
|
||||
ID string `gorm:"primarykey"`
|
||||
// Username of the user (eg "max" if the full username is @max@example.com)
|
||||
// Assume unchangable (once set by a user) to be kind to other implementations
|
||||
// Would be an easy avenue to fuck with them though
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue