Re: [sqlite] add column creating null columns even with default?

2009-05-29 Thread Damien Elmes
I use a Python ORM called SQLAlchemy, which maps its generic boolean type to 'boolean' on SQLite - which I subsequently plucked from the schema and put into an alter statement. If this is going to cause problems then I can report it to SQLAlchemy, but as John said, this seems to be treated like a

Re: [sqlite] add column creating null columns even with default?

2009-05-28 Thread John Machin
On 29/05/2009 2:53 AM, Simon Slavin wrote: > On 28 May 2009, at 9:00am, Damien Elmes wrote: > >> alter table cardModels add column allowEmptyAnswer boolean not null >> default 1 > >> sqlite> update cardModels set allowEmptyAnswer = 0; > > You're obviously used to other implementations of SQL.

Re: [sqlite] add column creating null columns even with default?

2009-05-28 Thread Simon Slavin
On 28 May 2009, at 9:00am, Damien Elmes wrote: > alter table cardModels add column allowEmptyAnswer boolean not null > default 1 > sqlite> update cardModels set allowEmptyAnswer = 0; You're obviously used to other implementations of SQL. 'boolean' isn't a legit type name:

[sqlite] add column creating null columns even with default?

2009-05-28 Thread Damien Elmes
Hi, My application issues an 'add column' statement to an sqlite database, like: alter table cardModels add column allowEmptyAnswer boolean not null default 1 alter table cardModels add column typeAnswer text not null default Most of the time this works, but sometimes users send me a database