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!

IF NOT EXISTS

Blue Mouse13e3a025830f
diff --git a/backend/migrations/clickhouse/2025_01_09.js b/backend/migrations/clickhouse/2025_01_09.js
index ebbbbc200..912d2aba3 100644
--- a/backend/migrations/clickhouse/2025_01_09.js
+++ b/backend/migrations/clickhouse/2025_01_09.js
@@ -2,13 +2,13 @@ const { queriesRunner, dbName } = require('./setup')
const queries = [
// Added 'host' column
- `ALTER TABLE ${dbName}.analytics ADD COLUMN host Nullable(String) AFTER pid`,
+ `ALTER TABLE ${dbName}.analytics ADD COLUMN IF NOT EXISTS host Nullable(String) AFTER pid`,
- `ALTER TABLE ${dbName}.customEV ADD COLUMN host Nullable(String) AFTER pid`,
+ `ALTER TABLE ${dbName}.customEV ADD COLUMN IF NOT EXISTS host Nullable(String) AFTER pid`,
- `ALTER TABLE ${dbName}.errors ADD COLUMN host Nullable(String) AFTER pid`,
+ `ALTER TABLE ${dbName}.errors ADD COLUMN IF NOT EXISTS host Nullable(String) AFTER pid`,
- `ALTER TABLE ${dbName}.performance ADD COLUMN host Nullable(String) AFTER pid`,
+ `ALTER TABLE ${dbName}.performance ADD COLUMN IF NOT EXISTS host Nullable(String) AFTER pid`,
]
queriesRunner(queries)