diff --git a/lib/sql.js b/lib/sql.js index cc2f2a96..7288f422 100644 --- a/lib/sql.js +++ b/lib/sql.js @@ -83,7 +83,7 @@ var sql = module.exports = { var columnDefinition = attrName + ' ' + type; // If type is an integer, set auto increment - if(type === 'TINYINT' || type === 'SMALLINT' || type === 'INT' || type === 'BIGINT') { + if(attribute.autoIncrement != false && (type === 'TINYINT' || type === 'SMALLINT' || type === 'INT' || type === 'BIGINT')) { return columnDefinition + ' UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY'; }