feat: add partial unique index for single primary address per client
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
1
src/lib/db/migrations/0001_soft_ender_wiggin.sql
Normal file
1
src/lib/db/migrations/0001_soft_ender_wiggin.sql
Normal file
@@ -0,0 +1 @@
|
||||
CREATE UNIQUE INDEX "idx_ca_primary" ON "client_addresses" USING btree ("client_id") WHERE "client_addresses"."is_primary" = true;
|
||||
Reference in New Issue
Block a user