KamoCRM

Multi-instance phone/SMS provider migration

FeatureInitializerService
Shipped
24 ஏப்ரல், 2026 அன்று 10:20 PM UTC
Author
Kamo
Commit
9064c22

Runs after Hibernate ddl-auto:update creates new tables (VOIP_PROVIDER_INSTANCE, BULK_TEXT_PROVIDER_INSTANCE, PHONE_EXTENSION, PHONE_END_USER, PHONE_DEVICE, PHONE_VOICEMAIL, SYSTEM_CONFIGURATION) from the renamed/new entities in kamo-shared-library commit 232d731. Handles what Hibernate cannot: - Copy rows from legacy voip_provider_config / bulk_text_provider_config into new *_instance tables, synthesizing instance_name from provider type. - Drop NOT_CONFIGURED (ordinal 0) rows — absence is now the "no provider" state. - Drop the now-empty legacy *_config tables. - Backfill instance_id on member_voip_config, voip_conversations, and kamotokens.org_oauth_token using each org's oldest active instance. - Rebuild org_oauth_token unique index from (org_id, provider) to (org_id, provider, instance_id) so multiple RingCentral instances per org work. - Drop orphan unique indexes from voip_conversations + provider instance tables. - Seed the system_configuration singleton row (voip sync interval 10min default, enabled true) — platform operator configures this via the new platform config VOIP & SMS tab. All statements idempotent; re-running on already-migrated DB is safe. Order 20 — after SchemaCleanupRunner (1), OrganizationTypeRemovalRunner (2), KamoCRMAgeReqUpdateRunner (10).

All changes

Like what you see shipping?

All of it arrives in your workspace on its own. Start on the free plan and read this page again in a month.

Start Free ForeverView Pricing