mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 06:52: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
|
|
@ -70,6 +70,7 @@ var testModels = []interface{}{
|
|||
>smodel.Report{},
|
||||
>smodel.Rule{},
|
||||
>smodel.AccountNote{},
|
||||
>smodel.AccountSettings{},
|
||||
}
|
||||
|
||||
// NewTestDB returns a new initialized, empty database for testing.
|
||||
|
|
@ -206,6 +207,12 @@ func StandardDBSetup(db db.DB, accounts map[string]*gtsmodel.Account) {
|
|||
}
|
||||
}
|
||||
|
||||
for _, v := range NewTestAccountSettings() {
|
||||
if err := db.Put(ctx, v); err != nil {
|
||||
log.Panic(nil, err)
|
||||
}
|
||||
}
|
||||
|
||||
for _, v := range NewTestAttachments() {
|
||||
if err := db.Put(ctx, v); err != nil {
|
||||
log.Panic(nil, err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue