mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02: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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user