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