Skip to content
This repository has been archived by the owner on Aug 5, 2021. It is now read-only.

Commit

Permalink
.raw() for migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
Philipp Waldmann committed Apr 3, 2014
1 parent 240be3d commit c9e1ed1
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
17 changes: 17 additions & 0 deletions lib/stores/sql/migrations/raw.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
exports.migration = {

raw: function(sql){
var self = this;

this.queue.push(function(next){
//Currently knex does not support schema transactions //.transacting(self.transaction)
self.connection.raw(sql).then(function(){
next();
}, function(err){
next(err);
});
});

return this;
}
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "openrecord",
"version": "0.11.2",
"version": "0.11.3",
"description": "Active record like ORM for nodejs",
"keywords": ["orm", "record", "sql", "sqlite3", "postgres", "pg", "mysql", "database", "activerecord"],
"author": "Philipp Waldmann <philipp.waldmann@s-team.at>",
Expand Down

0 comments on commit c9e1ed1

Please sign in to comment.