@@ -38,8 +38,13 @@ class SQLiteQueryGenerator extends MySqlQueryGenerator {
...
@@ -38,8 +38,13 @@ class SQLiteQueryGenerator extends MySqlQueryGenerator {
letdataTypeString=dataType;
letdataTypeString=dataType;
if(_.includes(dataType,'PRIMARY KEY')){
if(_.includes(dataType,'PRIMARY KEY')){
if(_.includes(dataType,'INTEGER')){// Only INTEGER is allowed for primary key, see https://github.com/sequelize/sequelize/issues/969 (no lenght, unsigned etc)
if(_.includes(dataType,'INTEGER')){
// Only INTEGER is allowed for primary key, see https://github.com/sequelize/sequelize/issues/969 (no lenght, unsigned etc)
sqlite:'CREATE TABLE IF NOT EXISTS `bar.projects` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `user_id` INTEGER REFERENCES `bar.users` (`id`) ON DELETE NO ACTION ON UPDATE CASCADE);',
sqlite:'CREATE TABLE IF NOT EXISTS `bar.projects` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `user_id` INTEGER REFERENCES `bar.users` (`id`) ON DELETE NO ACTION ON UPDATE CASCADE);',