Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop unused columns from lookup tables #4294

Merged
merged 1 commit into from
Apr 3, 2024

Conversation

codyebberson
Copy link
Member

This is a continuation of #4222 and #4202

Some of our FHIR search lookup tables are very old - notably Address and HumanName were authored during the earliest prototypes. And some of those lookup tables include columns and ideas that were never realized, which are now dead weight.

In #4222 we discontinued all use of the columns. They can now be deleted.

Here are the columns that will be deleted:

export async function run(client: PoolClient): Promise<void> {
  await client.query('ALTER TABLE "Address" DROP COLUMN "id"');
  await client.query('ALTER TABLE "Address" DROP COLUMN "index"');
  await client.query('ALTER TABLE "Address" DROP COLUMN "content"');

  await client.query('ALTER TABLE "HumanName" DROP COLUMN "id"');
  await client.query('ALTER TABLE "HumanName" DROP COLUMN "index"');
  await client.query('ALTER TABLE "HumanName" DROP COLUMN "content"');

  await client.query('ALTER TABLE "ValueSetElement" DROP COLUMN "id"');

  for (const resourceType of resourceTypes) {
    await client.query(`ALTER TABLE "${resourceType}_Token" DROP COLUMN "index"`);
  }
}

@codyebberson codyebberson requested a review from a team as a code owner April 1, 2024 21:42
Copy link

vercel bot commented Apr 1, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
medplum-provider ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 1, 2024 9:44pm
3 Ignored Deployments
Name Status Preview Comments Updated (UTC)
medplum-app ⬜️ Ignored (Inspect) Apr 1, 2024 9:44pm
medplum-storybook ⬜️ Ignored (Inspect) Visit Preview Apr 1, 2024 9:44pm
medplum-www ⬜️ Ignored (Inspect) Apr 1, 2024 9:44pm

Copy link

sonarcloud bot commented Apr 1, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@mattwiller mattwiller self-requested a review April 2, 2024 18:50
@reshmakh reshmakh added the fhir-datastore Related to the FHIR datastore, includes API and FHIR operations label Apr 2, 2024
@reshmakh reshmakh added this to the April 30th, 2024 milestone Apr 3, 2024
@codyebberson
Copy link
Member Author

Deploying to staging...

@codyebberson codyebberson added this pull request to the merge queue Apr 3, 2024
@codyebberson
Copy link
Member Author

Took ~600ms on staging

image

Merged via the queue into main with commit 4306ebc Apr 3, 2024
35 checks passed
@codyebberson codyebberson deleted the cody-drop-lookup-table-unused-columns branch April 3, 2024 16:20
medplumbot added a commit that referenced this pull request Apr 4, 2024
Added sortStringArray utility function (#4297)Remove 'dist' from eligibility demo (#4300)
Fixes #3944 - patient everything pagination (#4296)
Fixed fragment with only one child warning (#4306)
Fixes #4299 - use correct cardinality on contentReference (#4304)
Add "New..." action in Medplum Provider app (#4303)
Updating case study material (#4305)
Drop unused columns from lookup tables (#4294)
Fixes #3905 - better graphql mutation error reporting (#4308)
Fixes #4309 - AWS Parameter Store support for required database SSL (#4310)
@medplumbot medplumbot mentioned this pull request Apr 4, 2024
codyebberson pushed a commit that referenced this pull request Apr 4, 2024
Added sortStringArray utility function (#4297)Remove 'dist' from eligibility demo (#4300)
Fixes #3944 - patient everything pagination (#4296)
Fixed fragment with only one child warning (#4306)
Fixes #4299 - use correct cardinality on contentReference (#4304)
Add "New..." action in Medplum Provider app (#4303)
Updating case study material (#4305)
Drop unused columns from lookup tables (#4294)
Fixes #3905 - better graphql mutation error reporting (#4308)
Fixes #4309 - AWS Parameter Store support for required database SSL (#4310)
github-merge-queue bot pushed a commit that referenced this pull request Apr 5, 2024
Added sortStringArray utility function (#4297)Remove 'dist' from eligibility demo (#4300)
Fixes #3944 - patient everything pagination (#4296)
Fixed fragment with only one child warning (#4306)
Fixes #4299 - use correct cardinality on contentReference (#4304)
Add "New..." action in Medplum Provider app (#4303)
Updating case study material (#4305)
Drop unused columns from lookup tables (#4294)
Fixes #3905 - better graphql mutation error reporting (#4308)
Fixes #4309 - AWS Parameter Store support for required database SSL (#4310)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fhir-datastore Related to the FHIR datastore, includes API and FHIR operations
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants