mysql2sqlite icon indicating copy to clipboard operation
mysql2sqlite copied to clipboard

Primary key with AUTO_INCREMENT not converted right

Open timint opened this issue 4 years ago • 1 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`)
);

timint avatar May 01 '21 18:05 timint

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

ww9 avatar Dec 02 '21 03:12 ww9