forked from edward/owl-map
fix: setup: Add DB_USER and DB_NAME variables to example config and use them when creating the tables.
This commit is contained in:
parent
9f90fbd52d
commit
8dae88d6b4
|
@ -1,5 +1,8 @@
|
|||
"""Sample config."""
|
||||
|
||||
# POSTGIS
|
||||
DB_USER = "owl"
|
||||
DB_NAME = "matcher"
|
||||
|
||||
ID_TAGGING_SCHEMA_DIR = "/var/lib/data/id-tagging-schema"
|
||||
ID_PRESET_DIR = "/var/lib/data/id-tagging-schema/data/presets/"
|
||||
|
|
|
@ -2,9 +2,10 @@
|
|||
|
||||
from sqlalchemy.schema import CreateIndex, CreateTable
|
||||
|
||||
from config.default import DB_USER, DB_NAME
|
||||
from matcher import database, model
|
||||
|
||||
DB_URL = "postgresql:///matcher"
|
||||
DB_URL = f"postgresql://{DB_USER}@localhost/{DB_NAME}"
|
||||
database.init_db(DB_URL)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue