I am stupid and IDs should not be UUID but string
All checks were successful
/ docker (push) Successful in 3m58s
All checks were successful
/ docker (push) Successful in 3m58s
Other software might use different IDs that aren't UUIDs, so shouldn't lock own IDs into UUID either
This commit is contained in:
parent
98e842f0b1
commit
d4f2f66807
3 changed files with 22 additions and 22 deletions
|
@ -12,7 +12,7 @@ import (
|
||||||
// Instead, they are either stored on the remote server they originated from
|
// Instead, they are either stored on the remote server they originated from
|
||||||
// or an s3 bucket if uploaded to Linstrom.
|
// or an s3 bucket if uploaded to Linstrom.
|
||||||
type MediaMetadata struct {
|
type MediaMetadata struct {
|
||||||
ID string `gorm:"primarykey;type:uuid;default:gen_random_uuid()"` // The unique ID of this media file
|
ID string `gorm:"primarykey;default:gen_random_uuid()"` // The unique ID of this media file
|
||||||
CreatedAt time.Time // When this entry was created
|
CreatedAt time.Time // When this entry was created
|
||||||
UpdatedAt time.Time // When this entry was last updated
|
UpdatedAt time.Time // When this entry was last updated
|
||||||
// When this entry was deleted (for soft deletions)
|
// When this entry was deleted (for soft deletions)
|
||||||
|
|
|
@ -9,7 +9,7 @@ import (
|
||||||
|
|
||||||
// A note describes some user generated text content.
|
// A note describes some user generated text content.
|
||||||
type Note struct {
|
type Note struct {
|
||||||
ID string `gorm:"primarykey;type:uuid;default:gen_random_uuid()"` // Make ID a string (uuid) for other implementations
|
ID string `gorm:"primarykey;default:gen_random_uuid()"` // Make ID a string (uuid) for other implementations
|
||||||
CreatedAt time.Time // When this entry was created
|
CreatedAt time.Time // When this entry was created
|
||||||
UpdatedAt time.Time // When this entry was last updated
|
UpdatedAt time.Time // When this entry was last updated
|
||||||
// When this entry was deleted (for soft deletions)
|
// When this entry was deleted (for soft deletions)
|
||||||
|
|
|
@ -25,7 +25,7 @@ type User struct {
|
||||||
// identifier for users and other servers, especially when changing the username
|
// identifier for users and other servers, especially when changing the username
|
||||||
// (username != display name) might be a future feature
|
// (username != display name) might be a future feature
|
||||||
// Same also applies for other types that use a UUID as primary key
|
// Same also applies for other types that use a UUID as primary key
|
||||||
ID string `gorm:"primarykey;type:uuid;default:gen_random_uuid()" json:"id"`
|
ID string `gorm:"primarykey;default:gen_random_uuid()" json:"id"`
|
||||||
// Username of the user (eg "max" if the full username is @max@example.com)
|
// 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
|
// Assume unchangable (once set by a user) to be kind to other implementations
|
||||||
// Would be an easy avenue to fuck with them though
|
// Would be an easy avenue to fuck with them though
|
||||||
|
|
Loading…
Reference in a new issue