google-code-export / sqlite-manager

Automatically exported from code.google.com/p/sqlite-manager
1 stars 0 forks source link

Adding a column (to an existing table) with default value of 0 fails #193

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Structure tab, add a new column type integer default value of 0
2.
3.

What is the expected output? What do you see instead?

I expect to see some SQL like:

CREATE TABLE "mytable" ("id" INTEGER PRIMARY KEY , ... , idx INTEGER
DEFAULT 0, ... )

But it will not add the 'DEFAULT 0' text, instead the column is assigned
NULL as a result.

What version of the product are you using? 0.3.13
On what target Application? Firefox3.0.3 
On what operating system? Win2K3

Please provide any additional information below.

Probably a parsing error, thinks '0' is 0x00 or '\0' or NULL string.

BTW THIS TOOL ROCKS!!!  Keep up the great work.

Original issue reported on code.google.com by d.w.maci...@gmail.com on 23 Oct 2008 at 1:56

GoogleCodeExporter commented 9 years ago
Thanks. Yes someVar == "" turns out to be true even when someVar = 0;
Fixed. 

Original comment by mrinal.k...@gmail.com on 23 Oct 2008 at 11:47

GoogleCodeExporter commented 9 years ago
In fact, the bug you mentioned here has already been fixed. But there was a 
similar
bug at the time of adding a column to an existing table, Fixed that now.

Original comment by mrinal.k...@gmail.com on 23 Oct 2008 at 11:56