Skip to content

Releases: mstgnz/sqlmapper

v1.0.0

21 Apr 19:06

Choose a tag to compare

What's New

MySQL ↔ PostgreSQL Conversion — Production Ready

Full support for real-world dump formats:

mysqldump support

  • Strips /*!...*/ conditional comments automatically
  • Handles LOCK/UNLOCK TABLES blocks
  • Parses KEY idx_name (col) entries inside CREATE TABLE as indexes
  • Preserves ENUM values and converts them to PostgreSQL CREATE TYPE ... AS ENUM

pg_dump support

  • Strips COPY ... FROM stdin data blocks
  • Parses ALTER TABLE ONLY ... ADD CONSTRAINT for foreign keys, primary keys, and unique constraints
  • Handles schema-qualified names (public.users)

Type mapping (both directions)

  • AUTO_INCREMENT ↔ SERIAL / BIGSERIAL
  • datetime ↔ timestamp
  • blob ↔ bytea
  • json ↔ jsonb
  • tinyint → smallint, mediumint → integer

Test coverage

  • MySQL → PostgreSQL conversion
  • PostgreSQL → MySQL conversion
  • MySQL → PostgreSQL → MySQL roundtrip
  • PostgreSQL → MySQL → PostgreSQL roundtrip
  • Real mysqldump format parsing
  • Real pg_dump format parsing

v0.6.1

29 Dec 15:24

Choose a tag to compare

readme