| Conditions | 3 |
| Total Lines | 6 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import functools |
||
| 7 | def setup(): |
||
| 8 | """ Initialize the local database used for data processing. """ |
||
| 9 | engine = db.engine() |
||
| 10 | with engine.connect().execution_options(autocommit=True) as connection: |
||
| 11 | for extension in ["hstore", "postgis", "postgis_raster", "pgrouting"]: |
||
| 12 | connection.execute(f"CREATE EXTENSION IF NOT EXISTS {extension}") |
||
| 13 | |||
| 22 |