From 355aff8cf318658ce1e06326e766684833165242 Mon Sep 17 00:00:00 2001 From: n0body Date: Tue, 9 Sep 2025 15:22:20 +0300 Subject: [PATCH] Table and schema names are now no longer pulled from .env --- src/app_creator.py | 7 +++++-- src/config.py | 2 -- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/app_creator.py b/src/app_creator.py index 8bc5889..f46075c 100644 --- a/src/app_creator.py +++ b/src/app_creator.py @@ -12,12 +12,15 @@ if config.enable_api_docs: else: docs_url = None +schema_name = 'harticle' +table_name = 'articles' + @asynccontextmanager async def lifespan(app: FastAPI): DBwork.set_connection() - DBwork.schema_creator(config.schema_name, db.connection) - DBwork.table_creator(config.schema_name, config.table_name, db.connection) + DBwork.schema_creator(schema_name, db.connection) + DBwork.table_creator(schema_name, table_name, db.connection) yield DBwork.close_connection(db.connection) diff --git a/src/config.py b/src/config.py index 2d2d10a..f6a263a 100644 --- a/src/config.py +++ b/src/config.py @@ -6,8 +6,6 @@ postgres_user = config('POSTGRES_USER') postgres_password = config('POSTGRES_PASSWORD') host_name = config('HOST_NAME') port = config('PG_PORT') -schema_name = config('SCHEMA_NAME') -table_name = config('TABLE_NAME') enable_api_docs = config('ENABLE_API_DOCS', cast=bool)