Re: Adding stored procedures

2018-04-19 Thread Larry Martell
There are django-mssql and django_pyodbc but I was never able to get either of those to work for me. I ended up using odbc - I couldn't use the ORM, but I still was able to connect to the MSSQL DB from my django app using raw queries. On Wed, Apr 18, 2018 at 8:55 AM, Matthew Pava wrote: > Hi Chri

Re: Adding stored procedures

2018-04-19 Thread Jani Tiainen
Hi. Django migrations are run only once. If you want to change you stored procedure you always need a new migration. In case of being last migration you could develop it by having drop clause im reverse migration. But if there is another migration(s) between current and new stored procedure you n

RE: Adding stored procedures

2018-04-19 Thread Matthew Pava
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

Re: Adding stored procedures

2018-04-19 Thread Chris Wedgwood
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

RE: Adding stored procedures

2018-04-18 Thread Matthew Pava
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 ope

Re: adding stored procedures / postgres functions to db?

2006-05-11 Thread mazurin
Hi Malcolm, Got it. That's all I need to know. Thanks! Mikah -- --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To uns

Re: adding stored procedures / postgres functions to db?

2006-05-10 Thread Malcolm Tredinnick
Hi Mikah, On Wed, 2006-05-10 at 23:29 -0700, mazurin wrote: > Malcolm and Adrian, > > Thanks so much for your quick replies! I thought of that, but I > didn't know if it was the Djangoic way of doing it. You're welcome. :-) > Follow up question -- are _all_ the files in the sql/ directory

Re: adding stored procedures / postgres functions to db?

2006-05-10 Thread mazurin
Malcolm and Adrian, Thanks so much for your quick replies! I thought of that, but I didn't know if it was the Djangoic way of doing it. Follow up question -- are _all_ the files in the sql/ directory executed, or just those that have the same names as the models? mikah -- --~--~-

Re: adding stored procedures / postgres functions to db?

2006-05-10 Thread Adrian Holovaty
On 5/10/06, mazurin <[EMAIL PROTECTED]> wrote: > My question is, how do I add the CREATE FUNCTION statement to > Django's db-creating process? For initial data, I know that I just make > a bunch of .sql files that have the same name as the models, and put > them inside the sql/ directory. Is the

Re: adding stored procedures / postgres functions to db?

2006-05-10 Thread Malcolm Tredinnick
On Wed, 2006-05-10 at 06:20 -0700, mazurin wrote: > > Hi, > > I'm trying to implement a complicated sequence of updates inside a > form-handling view, and I realized that it might be best to do it > inside a Postgresql function. In fact, I've already found sample code > for a postgres function