Skip to content
Home / Migrations / PlanetScale → Turso

PlanetScale → Turso

medium

Turso 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.
Get started with Turso →

What this migration involves

Moving from PlanetScale to Turso is rated medium and takes about 4-8h on a typical project. The guide breaks it into 6 steps, 4 of which ship with runnable commands and 1 with a verification check. On pricing, PlanetScale is freemium and Turso is freemium with a free plan to test the move.

FAQ

How long does migrating from PlanetScale to Turso take?

Around 4-8h for a typical project — 6 steps, difficulty rated medium, 4 of them with copy-paste commands.

Is moving from PlanetScale to Turso reversible?

No reverse guide is tracked yet, so treat this as a one-way move and keep a full export of your PlanetScale data before you start.

What does Turso cost compared to PlanetScale?

PlanetScale: freemium from $29/mo, free plan available. Turso: freemium from $0/mo, free plan available.