tortoise / aerich

A database migrations tool for TortoiseORM, ready to production.
https://github.com/tortoise/aerich
Apache License 2.0
804 stars 90 forks source link

`Aerich` 0.7.1 cannot run with Postgresql #295

Open unownone opened 1 year ago

unownone commented 1 year ago

I am trying to setup my migrations but every command ends up being stuck or broken as in issue #63 . Downgrading Aerich to 0.6.3 fixes the problem.

My pyproject.toml


[tool.poetry.dependencies]
python = "^3.11"
fastapi = "^0.95.0"
openai = "^0.27.2"
uvicorn = "^0.21.1"
orjson = "^3.8.9"
python-multipart = "^0.0.6"
asyncpg = "^0.27.0"
psycopg2-binary = "^2.9.5"
fastapi-login = "^1.9.0"
tortoise-orm = {extras = ["asyncpg"], version = "^0.19.3"}
bcrypt = "^4.0.1"
pydantic = {extras = ["email"], version = "^1.10.7"}
aerich = "0.6.3"

[tool.poetry.scripts]
serve = "tuteai_backend:serve_dev"
serve-prod = "tuteai_backend:serve_prod"
# init-db = "tuteai_backend:initialize_db"
# makemigrations = "tuteai_backend:makemigrations"
# migrate = "tuteai_backend:migrate"

[tool.poetry.group.dev.dependencies]
devtools = "^0.10.0"
alembic = "^1.10.2"

[tool.aerich]
tortoise_orm = "tuteai_backend.TORTOISE_ORM"
location = "./migrations"
src_folder = "./."

My Postgresql is running on Cockroach db serverless.