diff --git a/webapp/backend/pkg/database/scrutiny_repository_migrations.go b/webapp/backend/pkg/database/scrutiny_repository_migrations.go index 1c821be..542677f 100644 --- a/webapp/backend/pkg/database/scrutiny_repository_migrations.go +++ b/webapp/backend/pkg/database/scrutiny_repository_migrations.go @@ -326,11 +326,11 @@ func (sr *scrutinyRepository) Migrate(ctx context.Context) error { SettingValueBool: false, }, { - SettingKeyName: "line_stroke", - SettingKeyDescription: "Temperature chart line stroke ('smooth' | 'straight' | 'stepline')", - SettingDataType: "string", - SettingValueString: "smooth", - }, + SettingKeyName: "line_stroke", + SettingKeyDescription: "Temperature chart line stroke ('smooth' | 'straight' | 'stepline')", + SettingDataType: "string", + SettingValueString: "smooth", + }, { SettingKeyName: "metrics.notify_level", @@ -354,6 +354,21 @@ func (sr *scrutinyRepository) Migrate(ctx context.Context) error { return tx.Create(&defaultSettings).Error }, }, + { + ID: "m20221115214900", // add line_stroke setting. + Migrate: func(tx *gorm.DB) error { + //add line_stroke setting default. + var defaultSettings = []m20220716214900.Setting{ + { + SettingKeyName: "line_stroke", + SettingKeyDescription: "Temperature chart line stroke ('smooth' | 'straight' | 'stepline')", + SettingDataType: "string", + SettingValueString: "smooth", + }, + } + return tx.Create(&defaultSettings).Error + }, + }, }) if err := m.Migrate(); err != nil {