From 563d9a1f5a042906f48438c89e8127b293168d6a Mon Sep 17 00:00:00 2001 From: Max Chis <48846180+maxachis@users.noreply.github.com> Date: Tue, 22 Jul 2025 11:49:25 -0400 Subject: [PATCH] Update DESIGN-PRINCIPLES.md --- DESIGN-PRINCIPLES.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/DESIGN-PRINCIPLES.md b/DESIGN-PRINCIPLES.md index 9fe02b8..ecf878c 100644 --- a/DESIGN-PRINCIPLES.md +++ b/DESIGN-PRINCIPLES.md @@ -247,8 +247,13 @@ The following columns should be present in all tables unless there is a compelli - many-to-many: `link_apples_oranges` - Link tables should have unique constraints reflective of the particular relationship: - one-to-one: separate unique constraints on each foreign key column - - one-to-many: unique constraint on the `one` column + - `unique(apple_id)` + - `unique(orange_id)` - many-to-many: single unique constraint encompassing *both* columns + - `unique(apple_id, orange_id)` + - one-to-many: unique constraint on the `one` column, and a *separate* unique constraint for both columns + - `unique(apple_id)` + - `unique(apple_id, orange_id)` # SQLAlchemy