SQLite → PostgreSQL
mediumSQLite is excellent for development and single-server apps. PostgreSQL is needed for multi-server, high concurrency, or cloud-native deployments.
Use Neon, Supabase, or Railway for managed Postgres. Or install locally.
docker run -d -p 5432:5432 -e POSTGRES_PASSWORD=pass postgres:16
SQLite → PostgreSQL differences: AUTOINCREMENT → SERIAL. BLOB → BYTEA. TEXT for dates → TIMESTAMP. No IF NOT EXISTS issues.
sqlite3 mydb.sqlite .dump > dump.sql
Edit dump.sql to remove SQLite-specific syntax. Import to Postgres.
psql $DATABASE_URL < dump.sql
Drizzle: change client import from 'drizzle-orm/better-sqlite3' to 'drizzle-orm/postgres-js'. Prisma: change provider to 'postgresql'.
What this migration involves
Moving from SQLite to PostgreSQL is rated medium and takes about 3-6h on a typical project. The guide breaks it into 6 steps, 3 of which ship with runnable commands and 1 with a verification check.
Related migrations
FAQ
How long does migrating from SQLite to PostgreSQL take?
Around 3-6h for a typical project — 6 steps, difficulty rated medium, 3 of them with copy-paste commands.
Is moving from SQLite to PostgreSQL reversible?
No reverse guide is tracked yet, so treat this as a one-way move and keep a full export of your SQLite data before you start.
What does PostgreSQL cost compared to SQLite?
Pricing for both tools is contact-based or not tracked yet.