Re: Ticket #12 Solution

2005-08-31 Thread Brant Harris
On 8/31/05, Brant Harris <[EMAIL PROTECTED]> wrote: > > Erm. Can you create a NOT NULL Column without a default in an ALTER > > Statement? I know you can't in MSSQL. > > It worked fine for me in MySQL... Not sure, although a change in the > code would be trivial. In retrospect it does NOT work.

Re: Ticket #12 Solution

2005-08-31 Thread Brant Harris
> Erm. Can you create a NOT NULL Column without a default in an ALTER > Statement? I know you can't in MSSQL. It worked fine for me in MySQL... Not sure, although a change in the code would be trivial. The other point you make is the sort of versioning of the transition file. I see your point,

Re: Ticket #12 Solution

2005-08-31 Thread Moof
Brant Harris wrote: > I now have a working solution to ticket #12. > > I've added some code to management.py that allows one to run: > >>django-admin.py transition ... >>django-admin.py sqlupdate > > > Now, sqlupdate looks at the "app.transition.py" file, and executes the > changes accordi

Re: Ticket #12 Solution

2005-08-30 Thread Brant Harris
Well here's the patch as it stands on my system. transition.diff Description: Binary data

Re: Ticket #12 Solution

2005-08-30 Thread Brant Harris
Do you mean db_check->database_check? That seems to check permissions and what not (which now that I think about it, I didn't really take into account). But it doesn't seem to even be approaching the ability to ALTER a table dependant on a new model. Did I miss something here? The two step proc

Re: Ticket #12 Solution

2005-08-30 Thread Adrian Holovaty
On 8/30/05, Brant Harris <[EMAIL PROTECTED]> wrote: > I now have a working solution to ticket #12. Your solution is very intriguing. There's already a "django-admin.py updatedb", which is currently commented-out in django/core/management.py and is only about 75% done. It's similar to what you've

Ticket #12 Solution

2005-08-30 Thread Brant Harris
I now have a working solution to ticket #12. I've added some code to management.py that allows one to run: > django-admin.py transition This then compares your current db to your models in that app, and next to each model creates a "transition file" so if your model was called "app.py", next to