From 016a8ffc120206ffee70d863cb9627b79cba30ee Mon Sep 17 00:00:00 2001 From: Alexander Maslov Date: Thu, 9 Apr 2020 16:51:43 +0300 Subject: [PATCH] Fix #16 Create db-migrate schema before creation of migrations table --- index.js | 6 ++++++ 1 file changed, 6 insertions(+) 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(