Commit e6319b2
Fix unique constraint to allow multiple regular palettes
- Remove UNIQUE(user_id, is_color_history) constraint that prevented
multiple regular palettes per user (FALSE values treated as identical)
- Add partial unique index that only enforces uniqueness for color
history rows (WHERE is_color_history = TRUE)
- Move constraint to indexes section for proper organization1 parent 0a1cf1e commit e6319b2
1 file changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
28 | 26 | | |
29 | 27 | | |
30 | 28 | | |
| |||
67 | 65 | | |
68 | 66 | | |
69 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
70 | 72 | | |
71 | 73 | | |
72 | 74 | | |
| |||
0 commit comments