|
package ocpmigrations
import (
"database/sql"
"github.com/RedHatInsights/insights-results-aggregator/migration"
"github.com/RedHatInsights/insights-results-aggregator/types"
)
var mig0012CreateClusterUserRuleDisableFeedback = migration . Migration {
StepUp : func ( tx * sql . Tx , _ types . DBDriver ) error {
_ , err := tx . Exec ( `
CREATE TABLE cluster_user_rule_disable_feedback (
cluster_id VARCHAR NOT NULL,
user_id VARCHAR NOT NULL,
rule_id VARCHAR NOT NULL,
message VARCHAR NOT NULL,
added_at TIMESTAMP NOT NULL,
updated_at TIMESTAMP NOT NULL,
PRIMARY KEY(cluster_id, user_id, rule_id)
)` )
return err
} ,
StepDown : func ( tx * sql . Tx , _ types . DBDriver ) error {
_ , err := tx . Exec ( `DROP TABLE cluster_user_rule_disable_feedback` )
return err
} ,
}
|