ww9 / mysql2sqlite

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

"Number" in field name translate to wrong field name #3

Open crysanthus opened 3 years ago

crysanthus commented 3 years ago

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