On Thu, Apr 23, 2009 at 3:54 AM, 83nini <83n...@gmail.com> wrote: > > Hi guys, > > I'm working on django tutorial that is in "www.djangobook.com", I'm in > chapter6 where i'm in the process of creating an admin Web site. > The site is created and it works just perfectly, the thing is I'm > trying to make some date and numeric fields optional, so I modified > the models.py folder and added the "null=True" statement as follows: > > publication_date = models.DateField(blank=True, null=True) > > now according to what's written in the book, it is my responsibility > to ALTER TABLE statement whenever such a change is made in the > models.py file, so I did the following: > 1. called python manage.py dbshell from the command line > 2. when i got the dbshell "mysql>", i wrote the following statement > ALTER TABLE books_book ALTER COLUMN publication_date DROP NOT > NULL; > > I'm getting "ALTER is not an internal command, external command, > program or commandfile" > > WHY???
This sounds like: http://code.djangoproject.com/ticket/10639 which was closed as a dup of another bug which was fixed pretty recently. So you can either try with a recent SVN checkout, or (what I do) just use the mysql program directly rather than going through manage.py dbshell for stuff like this. Karen --~--~---------~--~----~------------~-------~--~----~ 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 unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---