psql variable for :migschema
authorJason Etheridge <jason@esilibrary.com>
Sat, 9 Sep 2017 02:51:38 +0000 (22:51 -0400)
committerJason Etheridge <jason@esilibrary.com>
Sat, 9 Sep 2017 02:51:38 +0000 (22:51 -0400)
mig-sql already puts the migration schema in the search path, but
this can be useful for things like

    creator = (SELECT id FROM actor_usr WHERE usrname = :'migschema' || '_admin')

Signed-off-by: Jason Etheridge <jason@esilibrary.com>

mig-bin/mig-sql

index c218076..0f7d9e0 100755 (executable)
@@ -34,7 +34,8 @@ use Mig;
 pod2usage(-verbose => 2) if defined $ARGV[0] && $ARGV[0] eq '--help';
 
 my @MYARGV = (
-    'psql'
+     'psql'
+    ,'-vmigschema=' . $MIGSCHEMA
 );
 if (defined $BIBSTART) {
     push @MYARGV, '-vbibstart=' . $BIBSTART;