django-db-views icon indicating copy to clipboard operation
django-db-views copied to clipboard

Creating automatic migrations for Views models witch working reverse and full command options like in normal makemigrations

Results 10 django-db-views issues
Sort by recently updated
recently updated
newest added
trafficstars

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....

enhancement

I got the following error when trying to join two tables as follow: view_definition = lambda: str(SomeModel.objects.select_related("another_model").query) error: ``` django.db.utils.ProgrammingError: column "id" specified more than once ```

Postgres supports unique indexes on materialized views. It would be fantastic if `django-db-views` migrations would create indexes for `unique=True` and `unique_together` like standard Django models.

enhancement

I write `view_definition` SQL in my model as long multiline strings. When I run `makeviewmigrations`, it just spits out the string in one long line, newlines included. It would be...

enhancement

When I run `makeviewmigration`, it generates a migration file called, e.g., `0034_auto_20231130_2243.py`. I understand that that is the Django default, but it is not easy to understand. It would be...

enhancement

Related issue: #21 queued to fix in 0.1.6/0.1.7

bug

This might be more of a feature request than a bug, but I would love to see it work. So I have a model inheriting DbView and a regular Django...

For discussion: I am using DBViews where one view selects data from another view. In my use-case I do it because we have complex JSONB data in a (PostgreSQL) field...

enhancement

Next iteration of: https://github.com/BezBartek/django-db-views/issues/31 Goal is to user SeparateDatabaseAndState operations to wrap ViewRunPytohn operations, and add model changes into it. It will prevent regular Django makemigrations command from creating migrations...

enhancement

When using `django_db_views` to generate database view migrations that rely on `django.contrib.contenttypes.models.ContentType`, running `python manage.py makeviewmigrations --check --dry-run` on a fresh database (without applying migrations) results in the following error:...