// SPDX-FileCopyrightText: Copyright Orangebot, Inc. and Medplum contributors
// SPDX-License-Identifier: Apache-2.0
/*
* Generated by @medplum/generator
* Do not edit manually.
*/
import type { PoolClient } from 'pg';
export async function run(client: PoolClient): Promise<void> {
// Add tstzrange column to "MeasureReport" named "period_range"
await client.query(`ALTER TABLE "MeasureReport" ADD COLUMN IF NOT EXISTS "period_range" tstzrange`);
// Add a GIST index on the new "period_range" column
await client.query(
`CREATE INDEX CONCURRENTLY IF NOT EXISTS "MeasureReport_period_range_idx" ON "MeasureReport" USING GIST ("period_range")`
);
}