Greetings, I have a table in an SQLite3 database:
create table if not exists a (
id integer primary key autoincrement,
a text not null,
b integer default 0,
c boolean default 0,
d integer default null
);
and I wanted to change the boolean field c to a text field default null and clicked modify, removed the "0" from the default value field and selected "null" in the dropdown field "null".
I expected all other fields to remain unchanged, I expected an ALTER TABLE call, instead sqlitemanager executed a create table statement - and changed data types of two other fields:
* the autoincrement attribute was lost on the field id
* the default value of the field b integer default 0 was changed to default null !
CREATE TABLE 'a' (
'id' INTEGER PRIMARY KEY ,
'a' TEXT NOT NULL ,
'b' INTEGER ,
'c' TEXT ,
'd' INTEGER
) ;
Please fix. Thanks for the otherwise great software!
phpinfo() tells me: PHP Version 5.3.6,
SQLite support: enabled
PECL Module version: 2.0-dev $Id: sqlite.c 306939 2011-01-01 02:19:59Z felipe $
SQLite Library: 2.8.17
SQLite Encoding: iso8859
Here is the structure I expected:
'id' INTEGER PRIMARY KEY AUTOINCREMENT, (!!)
'a' TEXT NOT NULL ,
'b' INTEGER DEFAULT 0, (!!)
'c' TEXT DEFAULT NULL,
'd' INTEGER DEFAULT NULL