Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion DESIGN-PRINCIPLES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down