mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 12:32:25 -05:00
[chore] Move local account settings to separate db table (#2770)
* [chore] Move local account settings to separate database model * don't use separate settings_id
This commit is contained in:
parent
0767647056
commit
7f4a0a1aeb
36 changed files with 525 additions and 191 deletions
22
internal/cache/size.go
vendored
22
internal/cache/size.go
vendored
|
|
@ -28,6 +28,7 @@ import (
|
|||
"github.com/superseriousbusiness/gotosocial/internal/config"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/id"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/util"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
@ -219,9 +220,6 @@ func sizeofAccount() uintptr {
|
|||
Bot: func() *bool { ok := true; return &ok }(),
|
||||
Locked: func() *bool { ok := true; return &ok }(),
|
||||
Discoverable: func() *bool { ok := false; return &ok }(),
|
||||
Privacy: gtsmodel.VisibilityFollowersOnly,
|
||||
Sensitive: func() *bool { ok := true; return &ok }(),
|
||||
Language: "fr",
|
||||
URI: exampleURI,
|
||||
URL: exampleURI,
|
||||
InboxURI: exampleURI,
|
||||
|
|
@ -236,9 +234,7 @@ func sizeofAccount() uintptr {
|
|||
SensitizedAt: exampleTime,
|
||||
SilencedAt: exampleTime,
|
||||
SuspendedAt: exampleTime,
|
||||
HideCollections: func() *bool { ok := true; return &ok }(),
|
||||
SuspensionOrigin: exampleID,
|
||||
EnableRSS: func() *bool { ok := true; return &ok }(),
|
||||
}))
|
||||
}
|
||||
|
||||
|
|
@ -251,6 +247,22 @@ func sizeofAccountNote() uintptr {
|
|||
}))
|
||||
}
|
||||
|
||||
func sizeofAccountSettings() uintptr {
|
||||
return uintptr(size.Of(>smodel.AccountSettings{
|
||||
AccountID: exampleID,
|
||||
CreatedAt: exampleTime,
|
||||
UpdatedAt: exampleTime,
|
||||
Reason: exampleText,
|
||||
Privacy: gtsmodel.VisibilityFollowersOnly,
|
||||
Sensitive: util.Ptr(true),
|
||||
Language: "fr",
|
||||
StatusContentType: "text/plain",
|
||||
CustomCSS: exampleText,
|
||||
EnableRSS: util.Ptr(true),
|
||||
HideCollections: util.Ptr(false),
|
||||
}))
|
||||
}
|
||||
|
||||
func sizeofApplication() uintptr {
|
||||
return uintptr(size.Of(>smodel.Application{
|
||||
ID: exampleID,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue