Merge pull request #469 from AnalogJ/angular-v13-upgrade

pull/470/head
Jason Kulatunga 2 years ago committed by GitHub
commit 539c94595f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -326,11 +326,11 @@ func (sr *scrutinyRepository) Migrate(ctx context.Context) error {
SettingValueBool: false, SettingValueBool: false,
}, },
{ {
SettingKeyName: "line_stroke", SettingKeyName: "line_stroke",
SettingKeyDescription: "Temperature chart line stroke ('smooth' | 'straight' | 'stepline')", SettingKeyDescription: "Temperature chart line stroke ('smooth' | 'straight' | 'stepline')",
SettingDataType: "string", SettingDataType: "string",
SettingValueString: "smooth", SettingValueString: "smooth",
}, },
{ {
SettingKeyName: "metrics.notify_level", SettingKeyName: "metrics.notify_level",
@ -354,6 +354,21 @@ func (sr *scrutinyRepository) Migrate(ctx context.Context) error {
return tx.Create(&defaultSettings).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 { if err := m.Migrate(); err != nil {

Loading…
Cancel
Save