mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-01 02:43:31 -06:00
[chore] Migrate accounts to new table, relax uniqueness constraint of actor url and collections
This commit is contained in:
parent
57c5f68e1a
commit
fe352c69b5
37 changed files with 1270 additions and 566 deletions
|
|
@ -528,7 +528,7 @@ func stubbifyAccount(account *gtsmodel.Account, origin string) []string {
|
|||
account.Fields = nil
|
||||
account.Note = ""
|
||||
account.NoteRaw = ""
|
||||
account.Memorial = util.Ptr(false)
|
||||
account.MemorializedAt = never
|
||||
account.AlsoKnownAsURIs = nil
|
||||
account.MovedToURI = ""
|
||||
account.Discoverable = util.Ptr(false)
|
||||
|
|
@ -546,7 +546,7 @@ func stubbifyAccount(account *gtsmodel.Account, origin string) []string {
|
|||
"fields",
|
||||
"note",
|
||||
"note_raw",
|
||||
"memorial",
|
||||
"memorialized_at",
|
||||
"also_known_as_uris",
|
||||
"moved_to_uri",
|
||||
"discoverable",
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ func (suite *AccountDeleteTestSuite) TestAccountDeleteLocal() {
|
|||
suite.Nil(updatedAccount.Fields)
|
||||
suite.Zero(updatedAccount.Note)
|
||||
suite.Zero(updatedAccount.NoteRaw)
|
||||
suite.False(*updatedAccount.Memorial)
|
||||
suite.Zero(updatedAccount.MemorializedAt)
|
||||
suite.Empty(updatedAccount.AlsoKnownAsURIs)
|
||||
suite.False(*updatedAccount.Discoverable)
|
||||
suite.WithinDuration(time.Now(), updatedAccount.SuspendedAt, 1*time.Minute)
|
||||
|
|
|
|||
|
|
@ -78,8 +78,8 @@ func (p *Processor) Update(ctx context.Context, account *gtsmodel.Account, form
|
|||
}
|
||||
|
||||
if form.Bot != nil {
|
||||
account.Bot = form.Bot
|
||||
acctColumns = append(acctColumns, "bot")
|
||||
account.ActorType = gtsmodel.AccountActorTypeService
|
||||
acctColumns = append(acctColumns, "actor_type")
|
||||
}
|
||||
|
||||
if form.Locked != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue