diff --git a/packages/server/postgres/migrations/1714579256634_removeOneOnOneTeam.ts b/packages/server/postgres/migrations/1714579256634_removeOneOnOneTeam.ts new file mode 100644 index 00000000000..8352e12f597 --- /dev/null +++ b/packages/server/postgres/migrations/1714579256634_removeOneOnOneTeam.ts @@ -0,0 +1,22 @@ +import {Client} from 'pg' +import getPgConfig from '../getPgConfig' + +export async function up() { + const client = new Client(getPgConfig()) + await client.connect() + await client.query(` + ALTER TABLE "Team" + DROP COLUMN IF EXISTS "isOneOnOneTeam"; + `) + await client.end() +} + +export async function down() { + const client = new Client(getPgConfig()) + await client.connect() + await client.query(` + ALTER TABLE "Team" + ADD COLUMN IF NOT EXISTS "isOneOnOneTeam" BOOLEAN NOT NULL DEFAULT FALSE; + `) + await client.end() +}