On Mon, 22 Apr 2013, Bert Huijben wrote:
Sqlite doesn't implement an ALTER table statement that can update this, so I
don't think we should try to change this for 1.8.
You can copy the data to a temporary table; drop the old table; create a
new table with the new schema; and then copy everything back from the
temporary table. Do it all in a transaction and it should be reasonably
efficient. Like this:
BEGIN;
CREATE TEMP TABLE temp_foo AS SELECT * FROM foo;
DROP TABLE foo;
CREATE TABLE foo (col1 TYPE1, col2 TYPE2, col3 TYPE3);
INSERT INTO foo SELECT col1, col2, col3 FROM temp_foo;
DROP TABLE temp_foo;
COMMIT;
--apb (Alan Barrett)