updated event and router stacks
This commit is contained in:
@@ -9,17 +9,35 @@ from init_services import create_modules_and_services_and_actions
|
||||
from init_address import create_one_address
|
||||
from init_occ_defaults import create_occupant_defaults
|
||||
|
||||
set_alembic = bool(os.getenv("set_alembic", 0))
|
||||
set_alembic = bool(int(os.getenv("SET_ALEMBIC"), 0))
|
||||
|
||||
if __name__ == "__main__":
|
||||
print(f"Set alembic: {set_alembic}")
|
||||
|
||||
with get_db() as db_session:
|
||||
if set_alembic:
|
||||
generate_alembic(session=db_session)
|
||||
|
||||
create_one_address(db_session=db_session)
|
||||
init_api_enums_build_types(db_session=db_session)
|
||||
create_application_defaults(db_session=db_session)
|
||||
create_occupant_types_defaults(db_session=db_session)
|
||||
create_modules_and_services_and_actions(db_session=db_session)
|
||||
create_occupant_defaults(db_session=db_session)
|
||||
try:
|
||||
create_one_address(db_session=db_session)
|
||||
except Exception as e:
|
||||
print(f"Error creating address: {e}")
|
||||
try:
|
||||
init_api_enums_build_types(db_session=db_session)
|
||||
except Exception as e:
|
||||
print(f"Error creating enums: {e}")
|
||||
try:
|
||||
create_application_defaults(db_session=db_session)
|
||||
except Exception as e:
|
||||
print(f"Error creating application defaults: {e}")
|
||||
try:
|
||||
create_occupant_types_defaults(db_session=db_session)
|
||||
except Exception as e:
|
||||
print(f"Error creating occupant types defaults: {e}")
|
||||
try:
|
||||
create_modules_and_services_and_actions(db_session=db_session)
|
||||
except Exception as e:
|
||||
print(f"Error creating modules and services and actions: {e}")
|
||||
try:
|
||||
create_occupant_defaults(db_session=db_session)
|
||||
except Exception as e:
|
||||
print(f"Error creating occupant defaults: {e}")
|
||||
|
||||
Reference in New Issue
Block a user