On 4/22/06, Viktor <[EMAIL PROTECTED]> wrote: > When I define a model: > > >>> class Test(models.Model): > >>> ... some other fields ... > >>> bool_field = models.BooleanField(default=True) > > Django generate next sql: > > CREATE TABLE `test_test` ( > `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY, > ... some other fields ... > `bool_field` bool NOT NULL > > It doesn't generate the DEFAULT "1" part...
Hi Viktor, Default values aren't created at the SQL level -- they're enforced at the Django DB-API level. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~----------~----~----~----~------~----~------~--~---