added some qol to migrations

This commit is contained in:
Simone Robutti 2022-10-06 23:55:17 +02:00
parent ca595e1dd9
commit b6a0c792ae
5 changed files with 15 additions and 6 deletions

View File

@ -43,3 +43,7 @@ Aerich picks up the migrations according to the scheme of the db in the configur
Currently the consistency of the migrations for the different databases is not tested so please pay extra care when
committing a change and request special review.
Aerich configuration is specified in the pyproject.toml file. Since it doesn't support multiple databases, we have two
configuration files that allow to run aerich on different databases if you enter their respective migration folders.
You can find them in mobilizon_reshare/migrations.

View File

@ -10,8 +10,8 @@ services:
test: ["CMD", "pg_isready", "-U", "mobilizon_reshare"]
interval: 5s
retries: 5
expose:
- 5432
ports:
- 5432:5432
web:
build: .
command: poetry run mobilizon-reshare web

View File

@ -0,0 +1,4 @@
[tool.aerich]
tortoise_orm = "mobilizon_reshare.storage.db.TORTOISE_ORM"
location = "./"
src_folder = "./."

View File

@ -0,0 +1,4 @@
[tool.aerich]
tortoise_orm = "mobilizon_reshare.storage.db.TORTOISE_ORM"
location = "."
src_folder = "./."

View File

@ -40,10 +40,7 @@ sphinx-autodoc-typehints = "~1.17"
httpx = "^0.23.0"
[tool.aerich]
tortoise_orm = "mobilizon_reshare.storage.db.TORTOISE_ORM"
location = "./migrations"
src_folder = "./."
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"