mirror of
https://github.com/pocket-id/pocket-id.git
synced 2025-12-18 01:11:26 +03:00
fix: clear default app config variables from database
This commit is contained in:
@@ -432,11 +432,6 @@ func (s *AppConfigService) loadDbConfigInternal(ctx context.Context, tx *gorm.DB
|
|||||||
|
|
||||||
// Iterate through all values loaded from the database
|
// Iterate through all values loaded from the database
|
||||||
for _, v := range loaded {
|
for _, v := range loaded {
|
||||||
// If the value is empty, it means we are using the default value
|
|
||||||
if v.Value == "" {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
// Find the field in the struct whose "key" tag matches, then update that
|
// Find the field in the struct whose "key" tag matches, then update that
|
||||||
err = dest.UpdateField(v.Key, v.Value, false)
|
err = dest.UpdateField(v.Key, v.Value, false)
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
-- No rollback is needed for this migration.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
DELETE FROM app_config_variables WHERE value = '';
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
-- No rollback is needed for this migration.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
DELETE FROM app_config_variables WHERE value = '';
|
||||||
Reference in New Issue
Block a user