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

From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On 
Behalf Of Chris Wedgwood
Sent: Thursday, April 19, 2018 9:02 AM
To: Django users
Subject: Re: Adding stored procedures

Thanks Matthew

I probably need to think about this some more

I think using runsql will work. Do you know if you can set migrations to be 
rerunnable? It would be useful to be able to change something like a stored 
procedure and then it gets dropped and recreated each deployment

Saying that the stored procedure is going to be used for an import task that 
isn't actually related to Django so probably needs to be deployed  by another 
mechanism and I should leave migrations for only DJango specific changes

thanks
Chris



On Wednesday, 18 April 2018 07:50:52 UTC+1, Chris Wedgwood wrote:
Hi All

I am using SQL SERVER in my latest django project and I am going to be using 
some stored procedures.

My question is about how to go about deploying stored procedure changes with 
django. I have looked through the migrations documentation which looks very 
specific to model changes.

Has anyone had experience of having to create other things such a stored 
procedures/views/functions?

thanks
Chris




--
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+unsubscr...@googlegroups.com<mailto:django-users+unsubscr...@googlegroups.com>.
To post to this group, send email to 
django-users@googlegroups.com<mailto:django-users@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<https://groups.google.com/d/msgid/django-users/20a5ed5a-97f4-413b-8700-58606b781a2f%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@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/373c82f3da11492182afcb2ee961d0fd%40ISS1.ISS.LOCAL.
For more options, visit https://groups.google.com/d/optout.

Reply via email to