fix: clear default app config variables from database

This commit is contained in:
Elias Schneider
2025-06-01 20:46:31 +02:00
parent c24a5546a5
commit decf8ec70b
5 changed files with 4 additions and 5 deletions

View File

@@ -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)

View File

@@ -0,0 +1 @@
-- No rollback is needed for this migration.

View File

@@ -0,0 +1 @@
DELETE FROM app_config_variables WHERE value = '';

View File

@@ -0,0 +1 @@
-- No rollback is needed for this migration.

View File

@@ -0,0 +1 @@
DELETE FROM app_config_variables WHERE value = '';