Closed
Labels
enhancementNew feature or request
Description
Summary
Normalize existing phone numbers in the database to E.164 format and backfill country_id on customers.
Part of epic: #18
Blocked by: #19 (Phase 1 — phone input fix)
Scope
- Migration script to convert all phone numbers to E.164
- Backfill
country_idon customers based on phone dial code - Handle edge cases (numbers without country code, invalid formats)
Files Touched
- New:
scripts/normalize-phones.ts(migration script) main/db.ts(migration)
Acceptance Criteria
- All phone numbers in the database are in E.164 format (start with
+) - All customers have a
country_id(or null for unparseable numbers) - Edge cases are handled gracefully (numbers without country code → default to tenant country)
- No data loss during migration
- Migration is idempotent (safe to run multiple times)
Notes
- This is a data migration, not a feature — it cleans up existing data
- Numbers that can't be parsed are left as-is and flagged for manual review
- The migration should be run after Phase 1 ships (new numbers are already E.164)
- Consider adding a
phone_normalizedboolean column to track migration status
Metadata
Metadata
Assignees
Labels
enhancementNew feature or request
Activity
khaira777 commentedon Jul 6, 2026
Part of epic #18 — Internationalization
feat(i18n): country profiles, language-first wizard, Argentina IVA
feat(i18n): country profiles, language-first wizard, Argentina IVA
khaira777 commentedon Jul 18, 2026
✅ Completed in PR #119.
Closing as complete.