diff --git a/index.js b/index.js index dd262b4..0266044 100644 --- a/index.js +++ b/index.js @@ -238,6 +238,12 @@ var PgDriver = Base.extend({ return this.all('SET search_path TO ' + searchPath); }.bind(this) ) + .then( + function () { + // create schema if not exists + return this.all('SET search_path TO ' + this.schema); + }.bind(this) + ) .then( function () { return this.all(