I used two different mysql to sqlite conversion tools to do test conversions. One tool is written in python and is called mysql-to-sqlite, and the other in awk called mysql2sqlite, both available via github.

The one in python ran into an error and stopped very early in the process. The one in awk ran into a couple problems but completed. If I use a sqlite database inspector, the tables look like I expect.

The error message generated by the python converter:

100%|██████████| 1/1 [00:00<00:00, 724.15it/s]
2019-12-19 10:26:55 ERROR    SQLite failed creating table adm_table:
index id_column already exists
index id_column already exists

The column name "id_column" turns out to be used alot as a unique key in many tables in the mysql db.

The author of the tool points out:

https://stackoverflow.com/questions/27238178/duplicate-index-on-sqlite-not-on-mysql

where we encounter a phrase similar to "Each index name must be unique in the database".

I've searched the internet for the above and variants; it shows up on techonthenet.com in sqlite tutorials and a couple other places.

It does not appear to show up on sqlite.org, tho.

Is it true that "Each index name must be unique in the database"?

I was able to use the output of the qwk script to create an inspectable sqlite database without the process generating complaints about named indexes already existing.

Thanks!

-Mike
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to