Closed ayalon closed 9 months ago
Unfortunatly all auto_increment flags are missing and therefore the database is completely broken.
Hmm, a missing AUTOINCREMENT
shouldn't be the end of the world, no? 😂
I probably avoided adding it in the first place because the documentation states
The AUTOINCREMENT keyword imposes extra CPU, memory, disk space, and disk I/O overhead and should be avoided if not strictly needed. It is usually not needed.
I'll make sure to add it now.
Thanks for your response. Unfortunately, the Drupal database schema relies on the auto_increment values and there is no way around it. If you could add support for it, this would be great.
Looks like this will be nastier than I thought because it can only be used with INTEGER PRIMARY KEY AUTOINCREMENT
and would require a substantial rewrite of the code.
Not sure when I'll have time for it. If you have the time, please submit a PR, but make sure to test it properly.
@ayalon I managed to find some time and made it work, the only caveat is that you must only use numeric columns and non-compound primary indices as SQLite limits the use of AUTOINCREMENT
only to INTEGER PRIMARY KEY AUTOINCREMENT
I have released the change in v2.1.10.
Please, test it as soon as you can and report back.
I have tested this and it WORKS! Thanks a lot. Awesome work!
Can you also update the docker image with tag "latest". Currently the latest points to 2.1.9
We use SQLLite to run tests in a pipeline for Drupal and with the latest release, the dump is fully compatible to it's MySQL equivalent.
Describe the bug I try to migrate a Drupal schema into SQLite to run tests on it.
Expected behaviour The converter works without an error. All tables and data is converted. Unfortunatly all auto_increment flags are missing and therefore the database is completely broken.
Ï'm using MadiaDB 10.6.16.
An example table from MariaDB looks like this:
Actual result The resulting schema in sqlite looks like that:
wid is a primary key but has no autoincrement flag.
System Information
I have no clue, why the auto_increment is missing. If I use this tool https://github.com/dumblob/mysql2sqlite the increment is there but other things are broken.