Commit c0fcc92
Fix teams_name_unique: replace expression index with plain constraint (#33)
Migration 1709836800001 created an expression index on lower(trim(name))
which cannot be used as a Hasura on_conflict constraint target. This broke
team auto-provisioning (dataSourceHelpers.js) because the insert mutation
uses on_conflict: { constraint: teams_name_unique }. Application code
already normalizes names to lowercase/trimmed before insert, so a plain
unique constraint is sufficient and Hasura-compatible.
Also increases hasura_cli migrations server timeout from 30s to 120s to
prevent restart loops when applying large migration sets on cold start.
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 530d2e4 commit c0fcc92
3 files changed
Lines changed: 19 additions & 0 deletions
File tree
- services/hasura/migrations/1741520400001_fix_teams_name_unique_constraint
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| 106 | + | |
106 | 107 | | |
107 | 108 | | |
108 | 109 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
0 commit comments