Skip to content

[FEATURE] SQLModel Migration #852

Open
0 of 2 issues completed
Open
Task
0 of 2 issues completed
@electron271

Description

@electron271

This will need to be done before 0.1.0

TODO

  • Uninstall Prisma-related packages.
  • Refactor models and DB scripts to SQLModel conventions.
  • Replace all Prisma CRUD/query calls with SQLModel equivalents.
  • Set up Alembic for database migrations.
  • Adjust project requirements and documentation.

Packages

We would be using https://sqlmodel.tiangolo.com/ and https://github.com/sqlalchemy/alembic for migrations.

Drawbacks

  • Async support uncertain

Advantages

  • Fully python
  • More mature project

Areas migration will affect:

  • database schemas in tux/prisma will need to be re-written for SQLModel, 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 #843

Sub-issues

Metadata

Metadata

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions