diff --git a/index.js b/index.js index 7238c57..09f9599 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('CREATE SCHEMA IF NOT EXISTS ' + searchPath); + }.bind(this) + ) .then( function () { return this.all(