Closed ChrisLovering closed 2 years ago
Looks fine, the bogus DATABASE_URL
in the CI has to be changed. It was added because of the Pydantic configuration, I'll resolve all of those problems in my next PR, but it has to be updated in order for the tests to pass.
Thank you!
This PR moves our migrations to asyncpg, adds a docker volume for migrations and adds a helper task for generating those migrations.
Simply by running
poetry run task revision "Migration message here."
while the docker containers are running, a migration will be generated.Something to keep in mind is that, now that we are using asyncpg, no database validation can be run within Pydantic models. This now needs to be deferred to the routes that need that validation instead.