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!

1.0 KB
Raw Blame
// This migration adds Google Search Console integration columns and brandKeywords to the project table
const { queriesRunner, dbName } = require('./setup')

const queries = [
  `ALTER TABLE ${dbName}.project ADD COLUMN IF NOT EXISTS gscPropertyUri Nullable(String) DEFAULT NULL CODEC(ZSTD(3));`,
  `ALTER TABLE ${dbName}.project ADD COLUMN IF NOT EXISTS gscAccessTokenEnc Nullable(String) DEFAULT NULL CODEC(ZSTD(3));`,
  `ALTER TABLE ${dbName}.project ADD COLUMN IF NOT EXISTS gscRefreshTokenEnc Nullable(String) DEFAULT NULL CODEC(ZSTD(3));`,
  `ALTER TABLE ${dbName}.project ADD COLUMN IF NOT EXISTS gscTokenExpiry Nullable(Int64) DEFAULT NULL;`,
  `ALTER TABLE ${dbName}.project ADD COLUMN IF NOT EXISTS gscScope Nullable(String) DEFAULT NULL CODEC(ZSTD(3));`,
  `ALTER TABLE ${dbName}.project ADD COLUMN IF NOT EXISTS gscAccountEmail Nullable(String) DEFAULT NULL CODEC(ZSTD(3));`,
  `ALTER TABLE ${dbName}.project ADD COLUMN IF NOT EXISTS brandKeywords Nullable(String) DEFAULT NULL CODEC(ZSTD(3));`,
]

queriesRunner(queries)