From 6762ebc4068f9062091db7f8d467fecf60388d63 Mon Sep 17 00:00:00 2001 From: Nick O'Ferrall Date: Wed, 6 Mar 2024 09:05:45 +0000 Subject: [PATCH] feat: make all templates free (#9503) * feat: make all templates free * set orgid to aghostorg * update template ids and down migration org id check * make down migration noop * remove unused var --- .../1709551949071_makeAllTemplatesFree.ts | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 packages/server/postgres/migrations/1709551949071_makeAllTemplatesFree.ts diff --git a/packages/server/postgres/migrations/1709551949071_makeAllTemplatesFree.ts b/packages/server/postgres/migrations/1709551949071_makeAllTemplatesFree.ts new file mode 100644 index 00000000000..25bc6553255 --- /dev/null +++ b/packages/server/postgres/migrations/1709551949071_makeAllTemplatesFree.ts @@ -0,0 +1,20 @@ +import {Client} from 'pg' +import getPgConfig from '../getPgConfig' + +export async function up() { + const client = new Client(getPgConfig()) + await client.connect() + await client.query( + ` + UPDATE "MeetingTemplate" + SET "isFree" = true + WHERE "orgId" = 'aGhostOrg' + ` + ) + + await client.end() +} + +export async function down() { + // noop +}