Script for setting up database user, schema, and seed data.
This script is for bootstrapping the initial database. It can be run via a container, but requires that a Postgres superuser's credentials be provided via our normal config. That way the superuser can provision a less-privileged user for the application's database connection.
This commit is contained in:
@@ -16,7 +16,9 @@ from atst.app import make_config, make_app
|
||||
def reset_database():
|
||||
conn = db.engine.connect()
|
||||
|
||||
meta = sqlalchemy.MetaData(bind=conn, reflect=True)
|
||||
meta = sqlalchemy.MetaData(bind=conn)
|
||||
meta.reflect()
|
||||
|
||||
trans = conn.begin()
|
||||
|
||||
# drop all tables
|
||||
|
Reference in New Issue
Block a user