// 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> {
await client.query('ALTER TABLE IF EXISTS "Condition" ADD COLUMN IF NOT EXISTS "assertedDate" TIMESTAMPTZ');
await client.query(
'CREATE INDEX CONCURRENTLY IF NOT EXISTS Condition_assertedDate_idx ON "Condition" ("assertedDate")'
);
await client.query('ALTER TABLE IF EXISTS "Patient" ADD COLUMN IF NOT EXISTS "ethnicity" TEXT[]');
await client.query('ALTER TABLE IF EXISTS "Patient" ADD COLUMN IF NOT EXISTS "genderIdentity" TEXT[]');
await client.query('ALTER TABLE IF EXISTS "Patient" ADD COLUMN IF NOT EXISTS "race" TEXT[]');
await client.query(
'CREATE INDEX CONCURRENTLY IF NOT EXISTS Patient_ethnicity_idx ON "Patient" USING gin ("ethnicity")'
);
await client.query(
'CREATE INDEX CONCURRENTLY IF NOT EXISTS Patient_genderIdentity_idx ON "Patient" USING gin ("genderIdentity")'
);
await client.query('CREATE INDEX CONCURRENTLY IF NOT EXISTS Patient_race_idx ON "Patient" USING gin ("race")');
}