Instead of text-based rewrites, it parses CREATE TABLE statements into a small intermediate representation (IR), then emits equivalent SQL for the target dialect. This makes conversions safer, testable, and easier to extend.
It supports single-file and recursive folder conversion, includes a no-typing interactive TUI, and recently added an experimental IR v2 with constraint support and JSON output for CI and tooling use.
Feedback is very welcome, especially on schema portability and IR design.
dawitworku•2h ago
xsql started as a small internal tool to avoid rewriting SQL schemas by hand when switching between SQLite, PostgreSQL, and MySQL for local development and testing.
The main idea is to parse CREATE TABLE statements into a small intermediate representation (IR) instead of doing text-based rewrites. That makes the conversions easier to test and extend, and it’s why I’m experimenting with a richer IR v2 (including constraints and JSON output) rather than adding lots of ad-hoc rules.
The scope is intentionally limited for now (schema DDL only, no data migration). I’d really appreciate feedback on the IR approach, portability edge cases, or what features matter most in real-world schema migrations.