We need a converter that will take a .sql file in one syntax (e.g. Postgres syntax) and convert it to another (e.g. MySQL) syntax.
This will make it possible to make a web app primarily developing against one database (e.g. Postgres or SQLite) then add support for another database with minimal work by combining multi-db-driver's existing features with a full schema file converter to fully automate the process of "write once, support many" as much as possible.
Initial hypothesis: This can probably can be done by abstracting a bunch of dedicated tools that are designed to convert things in one direction. More research needed on what underlying tools are available and/or are best to use.
Initial research:
Some tools that looked interesting at first:
We looked into this and none of those tools appeared good at translating schema dumps from one SQL dialect to another. Translating individual queries looks mostly feasible, but schema dumps are much more difficult to translate.
2025-12-19 update:
This tool shows some promise, worth looking into: https://github.com/Dawaman43/xsql
We need a converter that will take a
.sqlfile in one syntax (e.g. Postgres syntax) and convert it to another (e.g. MySQL) syntax.This will make it possible to make a web app primarily developing against one database (e.g. Postgres or SQLite) then add support for another database with minimal work by combining multi-db-driver's existing features with a full schema file converter to fully automate the process of "write once, support many" as much as possible.
Initial hypothesis: This can probably can be done by abstracting a bunch of dedicated tools that are designed to convert things in one direction. More research needed on what underlying tools are available and/or are best to use.
Initial research:
Some tools that looked interesting at first:
We looked into this and none of those tools appeared good at translating schema dumps from one SQL dialect to another. Translating individual queries looks mostly feasible, but schema dumps are much more difficult to translate.
2025-12-19 update:
This tool shows some promise, worth looking into: https://github.com/Dawaman43/xsql