fix: adding migration changes - TimescaleDB - userAgent
This commit is contained in:
1 parent
987ed64256
commit
e145068287
1 file changed
+21
@@ -0,0 +1,21 @@
|
|||||||
|
import type { Pool } from "pg";
|
||||||
|
|
||||||
|
export const addUserAgentFields = async (pool: Pool) => {
|
||||||
|
await pool.query(`
|
||||||
|
ALTER TABLE monitors
|
||||||
|
ADD COLUMN IF NOT EXISTS custom_user_agent TEXT;
|
||||||
|
|
||||||
|
ALTER TABLE app_settings
|
||||||
|
ADD COLUMN IF NOT EXISTS default_user_agent TEXT;
|
||||||
|
`);
|
||||||
|
};
|
||||||
|
|
||||||
|
export const dropUserAgentFields = async (pool: Pool) => {
|
||||||
|
await pool.query(`
|
||||||
|
ALTER TABLE monitors
|
||||||
|
DROP COLUMN IF EXISTS custom_user_agent;
|
||||||
|
|
||||||
|
ALTER TABLE app_settings
|
||||||
|
DROP COLUMN IF EXISTS default_user_agent;
|
||||||
|
`);
|
||||||
|
};
|
||||||
Reference in new issue
Block a user