Skip to content

Commit

Permalink
updated init_db.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Nneji123 committed Jan 8, 2024
1 parent 811e255 commit c07ee8d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions api/init_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@
from sqlmodel import Session, SQLModel, create_engine
from sqlmodel.ext.asyncio import session

import sys
from pathlib import Path

# Get the absolute path of the directory containing this script
current_file = Path(__file__).resolve()
parent_directory = current_file.parent
project_directory = parent_directory.parent

sys.path.insert(0, str(project_directory))

from api.database import create_db_and_tables, create_town_and_people, get_db


Expand Down

0 comments on commit c07ee8d

Please sign in to comment.