diff --git a/Changelog.md b/Changelog.md index c18e79d7..de0398f5 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,6 +1,9 @@ ### v2.2.0 - (to do, in future) - Fixes error code spelling: `PARAM_MISSMATCH` -> `PARAM_MISMATCH` +### v2.1.5 - 08 Apr 2013 +- Don't create indexes for primary/composite keys; they are created automatically (#484) + ### v2.1.4 - 19 Mar 2014 - Fix TypeScript module declaration (#362) - Fixes reversed hasOne.getAccessor when called without callback (#267) diff --git a/lib/Drivers/DDL/SQL.js b/lib/Drivers/DDL/SQL.js index 38202c40..ad4456e3 100644 --- a/lib/Drivers/DDL/SQL.js +++ b/lib/Drivers/DDL/SQL.js @@ -18,13 +18,6 @@ exports.sync = function (opts, cb) { sync.defineType(k, this.customTypes[k]); } } - for (var k in opts.allProperties) { - if (typeof opts.id == "string" && opts.id == k) { - opts.allProperties[k].index = [ opts.table + "_pkey" ]; - } else if (Array.isArray(opts.id) && opts.id.indexOf(k) >= 0) { - opts.allProperties[k].index = [ opts.table + "_pkey" ]; - } - } sync.defineCollection(opts.table, opts.allProperties); diff --git a/package.json b/package.json index fd097ecb..5dfd9826 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "sqlite", "mongodb" ], - "version" : "2.1.4", + "version" : "2.1.5", "license" : "MIT", "homepage" : "http://dresende.github.io/node-orm2", "repository" : "http://github.com/dresende/node-orm2.git", @@ -38,7 +38,7 @@ "dependencies": { "enforce" : "0.1.2", "sql-query" : "0.1.16", - "sql-ddl-sync" : "git://github.com/dresende/node-sql-ddl-sync.git#v0.2.3", + "sql-ddl-sync" : "git://github.com/dresende/node-sql-ddl-sync.git#v0.2.4", "hat" : "0.0.3", "lodash" : "2.4.1" },