Sign in with your email on your new phone and your full message history syncs automatically, nothing is lost.
Switching phones doesn't mean starting over. When you sign in on a new device, your app history follows you including all settings and preferences.
Your messages are backed up on Pigeon's servers as encrypted ciphertext — stored specifically for you, readable only by you and those in your chat.
Short version: On your new phone, open Pigeon and enter your email address. You'll receive a one-time code to verify it's you. After that, your full message history syncs from the server.
Technical version: Your encryption keys are derived from your account credentials when you sign in. They're only stored locally on your device so Pigeon never has access. When you sign in to a new device you still authenticate with your email to derive the same keys, which are then able to decrypt your message history on your device.
Pigeon never holds your keys, just your encrypted messages.
If you sign out and back in on the same device, your history is already stored locally. Pigeon asks for your biometric or device password to unlock it — no re-download needed. Everything is exactly where you left it.