First, clone the repository from GitHub:
git clone git@github.com:WafiSolutions/Python.WafiArche.git
cd Python.WafiArchepython -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activatepip install -r requirements.txtEdit the .env file to ensure your database credentials and settings are correct. It should look like this:
DATABASE_URL=postgresql://postgres:test1234!@localhost/newtestEdit the .env file to ensure your database credentials and settings are correct. It should look like this:
alembic upgrade headTo start the FastAPI server, run the following command:
uvicorn main:app --reloadYou can create a new directory structure inside repositories, routers, and schemas by running:
python create_app.py myappYou can create a new directory structure inside repositories, routers, and schemas by running:
alembic downgrade -1Inside sql commandline:
DROP TYPE IF EXISTS vouchertype;
DROP TYPE salesorderstatus;To create tables again: (A recommendation will be drop files from alembics/versions/ and then run this)
alembic revision --autogenerate -m "Your migration message"
alembic upgrade head