Medoo icon indicating copy to clipboard operation
Medoo copied to clipboard

Issues going between MySQL and SQLite

Open alantiller opened this issue 4 months ago • 2 comments

I'm currently working on an application that utilizes Medoo, along with a custom migrations controller built around it. Table creation functions as expected when using MySQL; however, I'm encountering syntax-related issues—particularly with AUTO_INCREMENT—when attempting to run the same migrations on SQLite.

Is there a configuration setting within Medoo that addresses these differences, or would it be advisable to implement a translation layer that adjusts SQL syntax based on the active database driver?

alantiller avatar Aug 29 '25 07:08 alantiller

You can check out the database type via $database->type and run a different query for it.

catfan avatar Aug 29 '25 13:08 catfan

Thank you for your response. I was wondering if there are any plans to introduce greater intercompatibility or a built-in translation layer to help address these syntax differences across database types. Needing to manually check the driver and adjust queries accordingly does add some friction to the development process, though I do appreciate that the library is designed to remain lightweight and minimal.

alantiller avatar Aug 30 '25 06:08 alantiller