Re: [sqlite] Adding a NOT NULL column fails on empty table

2009-03-16 Thread Noah Hart
rom: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Alex Ousherovitch Sent: Monday, March 16, 2009 11:48 AM To: sqlite-users@sqlite.org Subject: Re: [sqlite] Adding a NOT NULL column fails on empty table We want this operation to work when it can and fail when it

Re: [sqlite] Adding a NOT NULL column fails on empty table

2009-03-16 Thread Alex Ousherovitch
We want this operation to work when it can and fail when it has to. In some cases the user will specify NOT NULL and in others they won't. Of course we can drop and recreate the table but then we have to examine the request to see if the field has the NOT NULL constraint and then test to see if the

Re: [sqlite] Adding a NOT NULL column fails on empty table

2009-03-16 Thread Igor Tandetnik
"Alex Ousherovitch" wrote in message news:5ee1928d06817b4788b64caf1a8517b00325e...@sfo-ex-01.ad.opentv.local > The attempts to add a NOT NULL column on an empty table > > ALTER TABLE tbl_name ADD COLUMN col_name blob NOT NULL > > fail with the following error message: > > Cannot add a NOT NULL co