ww9 / mysql2sqlite

Online MySQL to SQLite converter 🔨 https://ww9.github.io/mysql2sqlite/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Primary key with AUTO_INCREMENT not converted right

timint opened this issue · comments

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`)
);
commented

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