Refactor logistics and frontend code for better consistency.
Refactored several files to improve code clarity, error handling, and data integrity. Introduced type safety improvements, streamlined OpenAPI model integration, adjusted configuration settings, and enhanced QR code handling logic. Also updated scripts and tsconfig settings to temporarily bypass strict checks during development.
This commit is contained in:
parent
3d55c42312
commit
f41262575e
@ -134,9 +134,17 @@ def on_startup():
|
||||
if environment == "prod":
|
||||
from sqlalchemy.engine import reflection
|
||||
|
||||
# inspector = reflection.Inspector.from_engine(engine)
|
||||
# tables_exist = inspector.get_table_names()
|
||||
from app.models import ExperimentParameters # adjust the import as needed
|
||||
|
||||
inspector = reflection.Inspector.from_engine(engine)
|
||||
tables_exist = inspector.get_table_names()
|
||||
|
||||
if ExperimentParameters.__tablename__ not in tables_exist:
|
||||
print("Creating missing table: ExperimentParameters")
|
||||
ExperimentParameters.__table__.create(bind=engine)
|
||||
|
||||
# Ensure the production database is initialized
|
||||
if not tables_exist:
|
||||
print("Production database is empty. Initializing...")
|
||||
|
Loading…
x
Reference in New Issue
Block a user