Python 3 Script to migrate NextAuth users and sessions from PlanetScale to Upstash.
- Set appropriate values in a
.env
in the same folder as the script runs in. Check.env.sample
for all values to be set. - Install required dependencies (mysql-connector and redis) using
pip install -r requirements.txt
- Run the script using
python(3) run.py
. You will be prompted before the migration starts unless you setHEADLESS=true
in the .env
This migration script is designed to work with a separate table for auth_tokens
, specifically to migrate tokens for Directus, Pterodactyl Panel and WHMCS by default. Please change or remove this code depending on how your setup looks.