Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert models.py: 2. Primary Functional Models #1252

Open
6 tasks
xlorepdarkhelm opened this issue Aug 12, 2024 · 0 comments
Open
6 tasks

Convert models.py: 2. Primary Functional Models #1252

xlorepdarkhelm opened this issue Aug 12, 2024 · 0 comments

Comments

@xlorepdarkhelm
Copy link
Contributor

xlorepdarkhelm commented Aug 12, 2024

Note: This issue depends on #1251 to be completed and its PR merged before it can be started.

Converting models.py to SQLAlchemy 2.0 standards is a complex process, this issue is for updating the following model classes:

  • Service
  • ServiceUser
  • ServicePermission

These models require the following steps to be done for them (explained in Convert models.py classes to using SQLAlchemy 2.0 standards #1246):

  1. Use of Mapped and Type Hints
  2. Relationships
  3. Use of Mapped for Collections
  4. Constraints and Indexes
  5. Enum and Other Columns
  6. Class Methods and Properties
  7. Sessions

Acceptance Criteria:

  • Make the necessary changes to the model fields
  • Double check that running the migrations and tests still work as expected with no deviation from the previous code
  • Verify that a deploy to staging works with the changes once merged

Security Considerations

As SQLAlchemy 2.0+ is now released, the older 1.4 way is deprecated, and may not recieve security updates, as well as are expected to be completely phased out of the codebase in the relatively near future.

Other than that, there's really nothing. The end goal should be that this changes models.py and doesn't impact anything else.

@xlorepdarkhelm xlorepdarkhelm converted this from a draft issue Aug 12, 2024
@xlorepdarkhelm xlorepdarkhelm changed the title Convert models.py: Primary Functional Models Convert models.py: 2. Primary Functional Models Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🌱 New
Development

No branches or pull requests

1 participant