diff --git a/api/ruleset.go b/api/ruleset.go index c270171da..9b390f95b 100644 --- a/api/ruleset.go +++ b/api/ruleset.go @@ -121,7 +121,7 @@ func (h RuleSetHandler) Create(ctx *gin.Context) { _ = ctx.Error(err) return } - + h.Respond(ctx, http.StatusCreated, ruleset) } diff --git a/migration/v8/migrate.go b/migration/v8/migrate.go index e7fa1e5c6..e6034a70d 100644 --- a/migration/v8/migrate.go +++ b/migration/v8/migrate.go @@ -67,6 +67,21 @@ func (r Migration) Apply(db *gorm.DB) (err error) { return } } + err = db.Migrator().DropConstraint(&model.RuleSet{}, "fk_RuleSet_Image") + if err != nil { + err = liberr.Wrap(err) + return + } + err = db.Migrator().DropColumn(&model.RuleSet{}, "ImageID") + if err != nil { + err = liberr.Wrap(err) + return + } + err = db.Migrator().DropColumn(&model.RuleSet{}, "Custom") + if err != nil { + err = liberr.Wrap(err) + return + } return }