Re: Does a new field in existing populated database need both: null=True, blank=True?

2010-06-14 Thread Dave E
Thanks Anssi - that's very clear - Dave > If you don't define null=True the database will enforce that all rows > are not null. Of course when you add a field into the database, the > row will have a null value by default for the old rows, and the > database will give you an error. > > If null

Re: Does a new field in existing populated database need both: null=True, blank=True?

2010-06-13 Thread akaariai
On 13 kesä, 12:14, Dave E wrote: > I have a Django blog app with data in the (SQLite) database and have > installed South so that I can add a 'modified' date field to the > 'Entry' model. The field will initially be blank so I need blank=True > for Django's admin

Does a new field in existing populated database need both: null=True, blank=True?

2010-06-13 Thread Dave E
I have a Django blog app with data in the (SQLite) database and have installed South so that I can add a 'modified' date field to the 'Entry' model. The field will initially be blank so I need blank=True for Django's admin validation. However, since it will also be empty in the database, do I