diff --git a/server/src/db/migration/timescaledb/0022_add_strategy_to_monitors.ts b/server/src/db/migration/timescaledb/0022_add_strategy_to_monitors.ts new file mode 100644 index 000000000..1adda12bc --- /dev/null +++ b/server/src/db/migration/timescaledb/0022_add_strategy_to_monitors.ts @@ -0,0 +1,15 @@ +import type { Pool } from "pg"; + +export const addStrategyToMonitors = async (pool: Pool) => { + await pool.query(` + ALTER TABLE monitors + ADD COLUMN IF NOT EXISTS strategy TEXT DEFAULT 'desktop'; + `); +}; + +export const dropStrategyFromMonitors = async (pool: Pool) => { + await pool.query(` + ALTER TABLE monitors + DROP COLUMN IF EXISTS strategy; + `); +};