|
package ocpmigrations
import (
"database/sql"
"github.com/RedHatInsights/insights-results-aggregator/migration"
"github.com/RedHatInsights/insights-results-aggregator/types"
)
var mig0008AddOffsetFieldToReportTable = migration . Migration {
StepUp : func ( tx * sql . Tx , _ types . DBDriver ) error {
_ , err := tx . Exec ( `
ALTER TABLE report ADD COLUMN kafka_offset BIGINT NOT NULL DEFAULT 0
` )
return err
} ,
StepDown : func ( tx * sql . Tx , driver types . DBDriver ) error {
_ , err := tx . Exec ( `
ALTER TABLE report DROP COLUMN kafka_offset
` )
return err
} ,
}
|