Skip to content

Commit

Permalink
Merge pull request #469 from AnalogJ/angular-v13-upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
AnalogJ authored Apr 6, 2023
2 parents dea3623 + de21e61 commit 539c945
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions webapp/backend/pkg/database/scrutiny_repository_migrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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 {
Expand Down

0 comments on commit 539c945

Please sign in to comment.