mysql2sqlite icon indicating copy to clipboard operation
mysql2sqlite copied to clipboard

"Number" in field name translate to wrong field name

Open crysanthus opened this issue 4 years ago • 1 comments

If a field name includes the word 'Number', it gets converted to the wrong field name.

-- MySQL
DROP TABLE IF EXISTS `employees`;
CREATE TABLE `employees` (
  `employeeNumber` int(11) NOT NULL,
  `lastName` varchar(50) NOT NULL,
  `firstName` varchar(50) NOT NULL,
  `isActive` tinyint(1) DEFAULT '1',
  `extension` varchar(10) NOT NULL,
  `email` varchar(100) NOT NULL,
  `officeCode` varchar(10) NOT NULL,
  `reportsTo` int(11) DEFAULT NULL,
  `jobTitle` varchar(50) NOT NULL,
  PRIMARY KEY (`employeeNumber`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- converted sqlite
DROP TABLE IF EXISTS `employees`;
CREATE TABLE `employees` (
`employeTEXT  NOT NULL,
`lastName` TEXT NOT NULL,
`firstName` TEXT NOT NULL,
`isActive` tinyINTEGER DEFAULT '1',
`extension` TEXT NOT NULL,
`email` TEXT NOT NULL,
`officeCode` TEXT NOT NULL,
`reportsTo` INTEGER DEFAULT NULL,
`jobTitle` TEXT NOT NULL,
PRIMARY KEY (`employeeNumber`)
);

crysanthus avatar Jul 19 '21 11:07 crysanthus

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