Description
This will need to be done before 0.1.0
TODO
- Uninstall Prisma-related packages.
- Refactor models and DB scripts to Tortoise conventions.
- Replace all Prisma CRUD/query calls with Tortoise equivalents.
- Set up Aerich for database migrations.
- Adjust project requirements and documentation.
Packages
Most likely we would be using tortoise-orm[asyncpg] (tortoise with the asyncpg postgres backend) and https://github.com/tortoise/aerich for migrations.
Drawbacks
- Tortoise is a new project, breaking changes may happen so we need to be cautious
- Community answers may be lacking (e.g on stackoverflow) due to this
Advantages
Areas migration will affect:
- database schemas in tux/prisma will need to be re-written for tortoise, and migrations performed on the database
- database controllers and associated logic in tux/tux/database
- Remindme cog directly pulls the Reminder DB model
- poll cog pulls in the CaseType enum
- AFK systems directly imports the AFK model
- snippets use the CaseType enum
- all moderation cogs pull in CaseType enum
- moderation cases cog
- influxdb cog
- utils/converters.py pulls in from prisma.enums
- utils/exceptions pulls in prisma.models.Case
- utils/flags pulls in the CaseType enum
- probably several more that we'll find during the process
Alternative to #852