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

Avoid triggering migrations for get_backend_types #574

Open
jonespm opened this issue Nov 1, 2024 · 0 comments
Open

Avoid triggering migrations for get_backend_types #574

jonespm opened this issue Nov 1, 2024 · 0 comments
Assignees

Comments

@jonespm
Copy link
Member

jonespm commented Nov 1, 2024

In the model there's this code for choices this is both in the Queue and Meetings. This results in a new migration whenever get_backend_types() changes. This is dynamic and cannot be predicted

   backend_type = models.CharField(
        max_length=20,
        choices=get_backend_types(),
        null=False,
        default=get_default_backend,
    )

and

    allowed_backends = ArrayField(
        models.CharField(max_length=20, choices=get_backend_types(), blank=False),
        default=get_default_allowed_backends,
    )

This shouldn't be in the model because it makes it think a migration is missing. Instead we probably should move the choices completely out of the model and into the API.

To test this, you'll have to start up both without Zoom credentials (only in person) and ensure only Zoom appears. Then start with Zoom credentials and insure both In Person and Zoom appears. Also the migrations will need to be run to remove this from the migration process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant