DEV Community

Cover image for Moving a mysqldump or pg_dump file into SQLite and D1
Georgi Kalchev
Georgi Kalchev

Posted on Originally published at aiskills402.com

Moving a mysqldump or pg_dump file into SQLite and D1

A dump file is a script for its own engine. What mysqldump and pg_dump write that SQLite rejects, what it misreads without a sound, and how D1 takes the file.

A dump file is a script written for the engine that made it, and SQLite is a different engine that happens to read most of the same words. Part of a MySQL or Postgres dump fails at once with a syntax error, which is the good outcome. The rest is accepted and loaded, and some of that rest means something else on the other side: a backslash that was an escape becomes a plain character, a hexadecimal number becomes an integer, a marker for missing data becomes a two-letter string. This guide walks through what each dump format contains, which parts SQLite and Cloudflare D1 refuse, which parts they swallow wrongly, and how to prove a load kept the rows. The table definitions and queries that…

Read the full report on AISkills402: https://aiskills402.com/blog/mysql-postgres-dump-into-d1?utm_source=devto&utm_medium=social

Top comments (0)