The multi-platform application can import identities, conversations, interaction history, processed-update identifiers and announcement preferences from the SQLite database used by the former Telegram-only deployment.
- Back up both the old and new deployments.
- Configure the new application and allow it to create an empty
storage/app.sqlite. - Stop the old Telegram worker/webhook from writing to its database.
- Run:
php bin/migrate-legacy-telegram.php /path/to/old/bot.sqlite- Inspect the JSON summary and run:
php bin/self-test.php
php bin/verify-deployment.php- Point the Telegram webhook at the new public endpoint.
The migration is guarded by the legacy_telegram_migrated_at metadata value and refuses to run twice against the same destination database.
The old Telegram Git history can be preserved when updating the repository: rename the repository and replace its working tree in a new commit rather than recreating it.