OHDSI / OHDSI/CommonDataModel

FK Constraints in DuckDB

Open
#713 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

The ALTER TABLE way of adding constraints in DuckDb hasn't been implemented in v1.0. I haven't tested with v1.1 released a few days ago. I'm getting the following error: "https://duckdb.org/docs/sql/statements/alter_table", and see it documented here on the duckdb.org site under "ADD/DROP CONSTRAINT"

I'll work around by adding the constraints to the table DDL, with hopes of making a full contribution here.

Thanks for supporting DuckDB! It will be a great asset to my testing efforts. Thanks.

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 the repository's DuckDB-related DDL generation or execution entry points, then compare their handling of ALTER TABLE with DuckDB's documented ADD/DROP CONSTRAINT behavior. Verify the reported failure against the relevant DuckDB version and define done as foreign-key constraints being handled successfully through the ALTER TABLE path.

Written by the indexing model from the issue text.

Assessment

Tech stack
sql
Domain
databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.