PlanetScale → Turso
mediumTurso offers a generous free tier (500 DBs, 9GB, 1B reads). Unlike PlanetScale it's SQLite-based (libSQL), so queries are nearly identical but schema is SQLite dialect.
Estimated: 4-8h · 6 steps
Progress0%
Step 1: Export from PlanetScale
mysqldump -h $PS_HOST -u $PS_USER -p$PS_PASS --no-tablespaces $DB_NAME > dump.sql
Step 2: Create Turso database
turso db create mydb && turso db show mydb
Step 3: Convert schema
MySQL → SQLite: Remove AUTO_INCREMENT → INTEGER PRIMARY KEY autoincrement. DATETIME → TEXT or INTEGER (epoch). ENUM → TEXT with CHECK constraint.
Step 4: Import data
Convert dump.sql to SQLite-compatible SQL. Use turso db shell to execute.
turso db shell mydb < converted_dump.sql
Step 5: Update app connection
npm install @libsql/client && npm uninstall @planetscale/database
Step 6: Update queries
Drizzle: switch to drizzle-orm/libsql. Remove MySQL-specific functions. SQLite doesn't support all MySQL functions.
✓ Queries return correct results. App connects successfully.