ww9 / mysql2sqlite

Online MySQL to SQLite converter 🔨 https://ww9.github.io/mysql2sqlite/
The Unlicense
91 stars 15 forks source link

Primary key with AUTO_INCREMENT not converted right #1

Open timint opened 3 years ago

timint commented 3 years ago

A problem with AUTO INCREMENT:

This

CREATE TABLE IF NOT EXISTS `table_name` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  ...
  PRIMARY KEY (`id`)
);

Should become

CREATE TABLE IF NOT EXISTS `table_name` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT,
  ...
);

Not

CREATE TABLE IF NOT EXISTS `table_name` (
  `id` INTEGER NOT NULL,
  ...
  PRIMARY KEY (`id`)
);
ww9 commented 2 years ago

Hi! I am so sorry that I took this long to answer. I'll make sure GitHub notify me when someone creates an issue.

I think the best way to improve the tool is to create tests. I'll be doing that in the near future but I can't guarantee when.

I appreciate your submission. Thank you! <3