def engine(request): db.setup_local_pg_cluster(request, DATADIR, PORT) uri = 'postgresql://localhost:{}/postgres'.format(PORT) e = create_engine(uri) reworkschema.init(e, drop=True) ruischema.init(e) api.freeze_operations(e) return e
def engine(request): port = 5433 db.setup_local_pg_cluster(request, DATADIR, port) uri = 'postgresql://localhost:{}/postgres'.format(port) e = create_engine(uri) sch = formula_schema() sch.create(e) return e
def engine(request): db.setup_local_pg_cluster(request, DATADIR, 5433, { 'timezone': 'UTC', 'log_timezone': 'UTC' }) e = create_engine(DBURI) sch = schema.tsschema() sch.create(e) return e
def engine(request): port = 5433 db.setup_local_pg_cluster(request, DATADIR, port) uri = 'postgresql://localhost:{}/postgres'.format(port) sch1 = tsschema() sch2 = tsschema('tsh-upstream') e = create_engine(uri) sch1.create(e) sch2.create(e) yield e
def engine(request): port = 5433 db.setup_local_pg_cluster(request, DATADIR, port, { 'timezone': 'UTC', 'log_timezone': 'UTC' }) uri = 'postgresql://localhost:{}/postgres'.format(port) e = create_engine(uri) sch = alias_schema() sch.create(e) return e
def engine(request): db.setup_local_pg_cluster(request, DATADIR, PORT, { 'timezone': 'UTC', 'log_timezone': 'UTC' }) e = create_engine('postgresql://localhost:{}/postgres'.format(PORT)) schema.init(e, drop=True) api.freeze_operations(e) # help the `cleanup` fixture # (for some reason, working with a fresh engine therein won't work) global ENGINE ENGINE = e return e
def engine(request): db.setup_local_pg_cluster(request, DATADIR, 5433, { 'timezone': 'UTC', 'log_timezone': 'UTC' }) e = create_engine(DBURI) sch = tsschema() sch.create(e) sch = tsschema('other') sch.create(e) if has_formula(): from tshistory_formula.schema import formula_schema formula_schema().create(e) formula_schema('other').create(e) return e
def db(request): dbsetup.setup_local_pg_cluster(request, DATADIR, 5433, { 'timezone': 'UTC', 'log_timezone': 'UTC' })