#985 allow netdisco-{deploy,do,db-deploy} on custom tenant with NETDISCO_DB_TENANT
This commit is contained in:
@@ -97,6 +97,13 @@ if (ref {} eq ref setting('database')) {
|
|||||||
|
|
||||||
# and support tenancies by setting what the default schema points to
|
# and support tenancies by setting what the default schema points to
|
||||||
setting('plugins')->{DBIC}->{'netdisco'}->{'alias'} = 'default';
|
setting('plugins')->{DBIC}->{'netdisco'}->{'alias'} = 'default';
|
||||||
|
|
||||||
|
# allow override of the default tenancy
|
||||||
|
setting('plugins')->{DBIC}->{'default'}
|
||||||
|
= setting('plugins')->{DBIC}->{$ENV{NETDISCO_DB_TENANT}}
|
||||||
|
if $ENV{NETDISCO_DB_TENANT}
|
||||||
|
and $ENV{NETDISCO_DB_TENANT} ne 'netdisco'
|
||||||
|
and exists setting('plugins')->{DBIC}->{$ENV{NETDISCO_DB_TENANT}};
|
||||||
}
|
}
|
||||||
|
|
||||||
# always set this
|
# always set this
|
||||||
|
|||||||
Reference in New Issue
Block a user