django-pgviews
django-pgviews copied to clipboard
How to refresh materialised view in case of multidb in django using manage.py?
I am using Postgresql as database in my django project. I am using materialised views also using django-pgviews which is django module for using materialised views in django.
To refreshing materialised views I use command below
python manage.py sync_pgviews
But now I am using multidb in my django project. Which is easily manageable like
python manage.py migrate # This will apply sql to default database
python manage.py migrate --database=tableau # This will apply sql to tableau database
I was expecting --database=tableau
option to work with python manage.py sync_pgviews
also. But this does not work.
python manage.py sync_pgviews # refresh default db views
python manage.py sync_pgviews --database=tableau # This does not work
How can I refresh materialised view of other database using django using manage.py?