Hi Chris,
SQL Server is not one of the databases that Django supports out of the box. There are third party packages available, though, but I haven’t tested any of them with recent versions.
Saying that, you can create views in your database backend. In your migrations file, use the RunSQL operation.
https://docs.djangoproject.com/en/2.0/ref/migration-operations/#runsql
In your models file, change the Meta option, managed, to False.
https://docs.djangoproject.com/en/2.0/ref/models/options/#managed
Good luck!
As for stored procedures and functions, I haven’t worked enough with those mixed in with Django to give you much guidance except to do some more searching on the web. And I would also advise against using them so that you can keep your code in your Django project. I haven’t found a need for them myself while using Django.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
django-users...@googlegroups.com.
To post to this group, send email to
django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/CACQBJYU5CDhCrP7cNRpzp7fRDr1pyf48css-EaVW%3Drj65SmEsg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Hi Chris,
The migrations will be run whenever you execute the migrate command. When I want to make changes to an unmanaged model, in the next migration file I add a DROP statement to RunSQL, and then the new code to generate the VIEW. I haven’t attempted reversing a migration, though. I try to test with the new migration before deploying to production.
Best wishes,
Matthew
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
django-users...@googlegroups.com.
To post to this group, send email to
django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/20a5ed5a-97f4-413b-8700-58606b781a2f%40googlegroups.com.