CognxSafeTrack commited on
Commit ·
348fb8a
1
Parent(s): a3df350
feat(db): remove unique constraint on Organization.wabaId
Browse filesAllow multiple organizations to operate under the same WABA
(one WhatsApp Business Account, multiple phone numbers / orgs).
Migration applied directly on Neon — shadow DB blocked by pgvector.
packages/database/prisma/migrations/20260515000001_remove_waba_unique_constraint/migration.sql
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- Allow multiple organizations to share the same WABA ID
|
| 2 |
+
-- (e.g. multiple phone numbers under one Meta WhatsApp Business Account)
|
| 3 |
+
DROP INDEX IF EXISTS "Organization_wabaId_key";
|
packages/database/prisma/schema.prisma
CHANGED
|
@@ -10,7 +10,7 @@ datasource db {
|
|
| 10 |
model Organization {
|
| 11 |
id String @id @default(uuid())
|
| 12 |
name String
|
| 13 |
-
wabaId String?
|
| 14 |
metaBusinessId String?
|
| 15 |
systemUserToken String?
|
| 16 |
systemUserTokenIssuedAt DateTime?
|
|
|
|
| 10 |
model Organization {
|
| 11 |
id String @id @default(uuid())
|
| 12 |
name String
|
| 13 |
+
wabaId String?
|
| 14 |
metaBusinessId String?
|
| 15 |
systemUserToken String?
|
| 16 |
systemUserTokenIssuedAt DateTime?
|