Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

916 B
Raw Blame
const { queriesRunner, dbName } = require('./setup')

const queries = [
  `ALTER TABLE ${dbName}.feature_flag ADD COLUMN IF NOT EXISTS scheduledChange Nullable(String);`,
  `ALTER TABLE ${dbName}.feature_flag ADD COLUMN IF NOT EXISTS killSwitchActive Int8 DEFAULT 0 AFTER scheduledChange;`,
  `ALTER TABLE ${dbName}.feature_flag ADD COLUMN IF NOT EXISTS killSwitchValue Int8 DEFAULT 0 AFTER killSwitchActive;`,
  `ALTER TABLE ${dbName}.feature_flag ADD COLUMN IF NOT EXISTS killedAt Nullable(DateTime('UTC')) AFTER killSwitchValue;`,
  `ALTER TABLE ${dbName}.feature_flag ADD COLUMN IF NOT EXISTS targetingUpdatedAt Nullable(DateTime('UTC')) AFTER killedAt;`,
  `ALTER TABLE ${dbName}.feature_flag ADD COLUMN IF NOT EXISTS updated DateTime('UTC') DEFAULT created AFTER created;`,
  `ALTER TABLE ${dbName}.feature_flag UPDATE targetingUpdatedAt = created WHERE targetingUpdatedAt IS NULL;`,
]

queriesRunner(queries)