Skip to main content
Glama
v7.ts788 B
// 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 the "owner" column await client.query('ALTER TABLE "Project" ADD COLUMN "owner" TEXT'); // For each project, populate the "owner" column const projects = await client.query('SELECT "id", "content" FROM "Project"'); for (const project of projects.rows) { const id = project.id; const obj = JSON.parse(project.content); const owner = obj.owner?.reference; if (owner) { await client.query('UPDATE "Project" SET "owner"=$1 WHERE "id"=$2', [owner, id]); } } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/medplum/medplum'

If you have feedback or need assistance with the MCP directory API, please join our Discord server