Skip to content

Testing: compatibility with -no-migrations mode #24

@benjaminrigaud

Description

@benjaminrigaud

When running pytest --no-migrations, Models are synced to their corresponding tables as-is: no migrations are executed.

django-db-views doesn't support this mode: the views are not created and the tests fail.

As a workaround, I have implemented a fixture to be able to apply any migration on the fly.

A proper implementation in django-db-views could be to uncouple the SQL creating the views from the migration framework: it would permit the creation of a few helper to execute this SQL outside of the migrations (django-pgtrigger does something like that).

What are your thoughts?

References:

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions