diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..f98171d --- /dev/null +++ b/.travis.yml @@ -0,0 +1,5 @@ +language: node_js +node_js: +- '0.12' +- '4.2' +- 'stable' diff --git a/dist/adapter.js b/dist/adapter.js index ab307b6..b400ad3 100644 --- a/dist/adapter.js +++ b/dist/adapter.js @@ -145,6 +145,14 @@ var adapter = { }); } + if (!_lodash2['default'].isEmpty(collection.triggers)) { + collection.triggers.forEach(function (trigger) { + queries.push({ + sql: trigger + }); + }); + } + // need to create sequence and trigger for auto increment this.executeQuery(connectionName, queries).nodeify(cb); }, diff --git a/lib/adapter.js b/lib/adapter.js index 34f874f..70889aa 100644 --- a/lib/adapter.js +++ b/lib/adapter.js @@ -129,6 +129,14 @@ const adapter = { }) } + if (!_.isEmpty(collection.triggers)) { + collection.triggers.forEach(trigger => { + queries.push({ + sql: trigger + }) + }) + } + // need to create sequence and trigger for auto increment this.executeQuery(connectionName, queries).nodeify(cb)