Skip to content

Commit

Permalink
Fix duplicate key indices - #484
Browse files Browse the repository at this point in the history
  • Loading branch information
dxg committed Apr 8, 2014
1 parent 25ef62f commit e62e09c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
3 changes: 3 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
7 changes: 0 additions & 7 deletions lib/Drivers/DDL/SQL.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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"
},
Expand Down

0 comments on commit e62e09c

Please sign in to comment.