fix: adding timescaledb changes
This commit is contained in:
1 parent
f7514bc938
commit
5791bdd5e7
1 file changed
+15
@@ -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;
|
||||||
|
`);
|
||||||
|
};
|
||||||
Reference in new issue
Block a user