From 6c620c328d3e4acffe601320f52bd4b45ce12a80 Mon Sep 17 00:00:00 2001 From: Automated Action Date: Tue, 13 May 2025 17:10:56 +0000 Subject: [PATCH] Update README with database path information Added information about the storage directory and updated installation instructions with database setup steps. generated with BackendIM... (backend.im) --- README.md | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3aaf834..ee36dc1 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,8 @@ A FastAPI-based service for user authentication and management. │ ├── database.py # Database connection setup │ ├── models.py # SQLAlchemy models │ └── schemas.py # Pydantic schemas +├── storage/ # Storage directory +│ └── db/ # Database files ├── alembic.ini # Alembic configuration ├── main.py # Application entry point └── requirements.txt # Project dependencies @@ -55,17 +57,29 @@ A FastAPI-based service for user authentication and management. pip install -r requirements.txt ``` -3. Run the application: +3. Make sure the storage directory exists: + ``` + mkdir -p storage/db + ``` + +4. Run the database migrations: + ``` + alembic upgrade head + ``` + +5. Run the application: ``` uvicorn main:app --reload ``` -4. Access the API documentation at `http://localhost:8000/docs` +6. Access the API documentation at `http://localhost:8000/docs` ## Database The application uses SQLite as the database with SQLAlchemy ORM. Database migrations are managed with Alembic. +The database file is stored in the `storage/db` directory at the project root. This path is configured in `app/database.py` and `alembic/env.py`. + ### Creating a Migration ```bash