diff --git a/backend/internal/service/app_config_service.go b/backend/internal/service/app_config_service.go index 71b562c6..9c075f0b 100644 --- a/backend/internal/service/app_config_service.go +++ b/backend/internal/service/app_config_service.go @@ -432,11 +432,6 @@ func (s *AppConfigService) loadDbConfigInternal(ctx context.Context, tx *gorm.DB // Iterate through all values loaded from the database 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 err = dest.UpdateField(v.Key, v.Value, false) diff --git a/backend/resources/migrations/postgres/20250601204251_clear_default_app_config_variables.down.sql b/backend/resources/migrations/postgres/20250601204251_clear_default_app_config_variables.down.sql new file mode 100644 index 00000000..69379243 --- /dev/null +++ b/backend/resources/migrations/postgres/20250601204251_clear_default_app_config_variables.down.sql @@ -0,0 +1 @@ +-- No rollback is needed for this migration. \ No newline at end of file diff --git a/backend/resources/migrations/postgres/20250601204251_clear_default_app_config_variables.up.sql b/backend/resources/migrations/postgres/20250601204251_clear_default_app_config_variables.up.sql new file mode 100644 index 00000000..b39ea652 --- /dev/null +++ b/backend/resources/migrations/postgres/20250601204251_clear_default_app_config_variables.up.sql @@ -0,0 +1 @@ +DELETE FROM app_config_variables WHERE value = ''; \ No newline at end of file diff --git a/backend/resources/migrations/sqlite/20250601204251_clear_default_app_config_variables.down.sql b/backend/resources/migrations/sqlite/20250601204251_clear_default_app_config_variables.down.sql new file mode 100644 index 00000000..69379243 --- /dev/null +++ b/backend/resources/migrations/sqlite/20250601204251_clear_default_app_config_variables.down.sql @@ -0,0 +1 @@ +-- No rollback is needed for this migration. \ No newline at end of file diff --git a/backend/resources/migrations/sqlite/20250601204251_clear_default_app_config_variables.up.sql b/backend/resources/migrations/sqlite/20250601204251_clear_default_app_config_variables.up.sql new file mode 100644 index 00000000..b39ea652 --- /dev/null +++ b/backend/resources/migrations/sqlite/20250601204251_clear_default_app_config_variables.up.sql @@ -0,0 +1 @@ +DELETE FROM app_config_variables WHERE value = ''; \ No newline at end of file