Follow the steps below to set up and run the project on your local machine.
To install all required packages, use the following command:
pip install -r requirements.txt
Initialize Alembic for database migration by running:
alembic init alembic
In your .env file, configure the database connection by adding the following line:
DATABASE_URL=mysql+pymysql://root:Probing$7@localhost/mydb
Ensure the details (username, password, database name) match your MySQL setup.
If you want to start tracking your project with Git, initialize a new Git repository using:
git init
Database Migrations with Alembic
Whenever you make changes to your database models, create a new migration file and apply the changes using the following commands:
alembic revision --autogenerate -m "Describe your changes"
alembic upgrade head
To downgrade a migration, use the following command (replace 55c70d0954c6_adding_new_changes with the target revision ID):
alembic downgrade 55c70d0954c6_adding_new_changes
Feel free to reach out if you have any questions or issues while setting up the project.