Create advisor_ratings
|
_ , err := tx . Exec ( `
CREATE TABLE advisor_ratings (
user_id VARCHAR NOT NULL,
org_id VARCHAR NOT NULL,
rule_id VARCHAR NOT NULL,
error_key VARCHAR NOT NULL,
rated_at TIMESTAMP,
last_updated_at TIMESTAMP,
rating SMALLINT,
PRIMARY KEY(user_id, org_id, rule_id, error_key)
)` )
return err
} ,
StepDown : func ( tx * sql . Tx , driver types . DBDriver ) error {
_ , err := tx . Exec ( `
DROP TABLE advisor_ratings;
` )
return err
} ,
}
|