Commit 7cafaa87 authored by Bruce Flynn's avatar Bruce Flynn

Fix: No permissions to create schema by default

Default amrc database does not provided perms to create schema for
awsapi user.
parent fcff30b0
......@@ -50,7 +50,8 @@ def init(_engine=None):
config.DB_URL, poolclass=NullPool,
connect_args={'application_name': 'AmrcAwsApi'})
engine.execute("CREATE SCHEMA IF NOT EXISTS {:s}".format(config.DB_SCHEMA))
# Can't always do this as by default there are no perms
# engine.execute("CREATE SCHEMA IF NOT EXISTS {:s}".format(config.DB_SCHEMA))
metadata.bind = engine
metadata.reflect(schema=metadata.schema)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment