From b4288f3c47a9ff9254b933dcb9ee7274d4a4135c Mon Sep 17 00:00:00 2001 From: Tobi Smethurst <31960611+tsmethurst@users.noreply.github.com> Date: Sun, 13 Jun 2021 18:42:28 +0200 Subject: Timeline manager (#40) * start messing about with timeline manager * i have no idea what i'm doing * i continue to not know what i'm doing * it's coming along * bit more progress * update timeline with new posts as they come in * lint and fmt * Select accounts where empty string * restructure a bunch, get unfaves working * moving stuff around * federate status deletes properly * mention regex better but not 100% there * fix regex * some more hacking away at the timeline code phew * fix up some little things * i can't even * more timeline stuff * move to ulid * fiddley * some lil fixes for kibou compatibility * timelines working pretty alright! * tidy + lint --- internal/gtsmodel/account.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'internal/gtsmodel/account.go') diff --git a/internal/gtsmodel/account.go b/internal/gtsmodel/account.go index 04eb58e8c..ba9963ac6 100644 --- a/internal/gtsmodel/account.go +++ b/internal/gtsmodel/account.go @@ -33,8 +33,8 @@ type Account struct { BASIC INFO */ - // id of this account in the local database; the end-user will never need to know this, it's strictly internal - ID string `pg:"type:uuid,default:gen_random_uuid(),pk,notnull,unique"` + // id of this account in the local database + ID string `pg:"type:CHAR(26),pk,notnull,unique"` // Username of the account, should just be a string of [a-z0-9_]. Can be added to domain to create the full username in the form ``[username]@[domain]`` eg., ``user_96@example.org`` Username string `pg:",notnull,unique:userdomain"` // username and domain should be unique *with* each other // Domain of the account, will be null if this is a local account, otherwise something like ``example.org`` or ``mastodon.social``. Should be unique with username. @@ -45,11 +45,11 @@ type Account struct { */ // ID of the avatar as a media attachment - AvatarMediaAttachmentID string + AvatarMediaAttachmentID string `pg:"type:CHAR(26)"` // For a non-local account, where can the header be fetched? AvatarRemoteURL string // ID of the header as a media attachment - HeaderMediaAttachmentID string + HeaderMediaAttachmentID string `pg:"type:CHAR(26)"` // For a non-local account, where can the header be fetched? HeaderRemoteURL string // DisplayName for this account. Can be empty, then just the Username will be used for display purposes. @@ -61,7 +61,7 @@ type Account struct { // Is this a memorial account, ie., has the user passed away? Memorial bool // This account has moved this account id in the database - MovedToAccountID string + MovedToAccountID string `pg:"type:CHAR(26)"` // When was this account created? CreatedAt time.Time `pg:"type:timestamp,notnull,default:now()"` // When was this account last updated? -- cgit v1.2.3