OHDSI / OHDSI/CommonDataModel

Change foreign key constraints to be deferrable in PostgreSQL DDL (and possibly others?)

Open
#543 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Enhancement
Dominant language
HTML
Stars
1.1k
Forks
508
Avg merge
1h 30m
Merged PRs (30d)
3

Description

Would it make sense to introduce "DEFERRABLE" keyword when creating foreign key constraints in these tables? It simplifies process of actually populating tables from Athena downloads or making local changes, without having to drop and re-create constraints.

file in question

Links:

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with inst/ddl/5.4/postgresql/OMOPCDM_postgresql_5.4_constraints.sql and the linked PostgreSQL SET CONSTRAINTS documentation. Determine whether the request applies only to PostgreSQL or to other DDL variants as well; done means the agreed foreign-key constraint definitions are updated consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql
Domain
databases
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.