title: How to modify column type fast in SQLite?
body: <p>I have a 3 GB SQLite database. I want to modify column type of one of the table columns.
  I know that sqlite does not support altering columns and this can only be done by recreating a table.
  That's how I do it:</p>
  <pre><code>BEGIN TRANSACTION;
  ALTER TABLE tbl RENAME TO tbl_;
  CREATE TABLE tbl (a INTEGER, b TEXT, c TEXT);
  INSERT INTO tbl SELECT * FROM tbl_;
  DROP TABLE tbl_;
  COMMIT;
  </code></pre>
  <p>I thought that during this process since I use a transaction then the database size will not increase. But it did. On my disk not enough space to double the database size. Is it normal that the database size increases within the transaction? Is there any other way of modifying column type without increasing database size? This process also takes a lot of time. Unexpectedly, most of the time is taken by <code>DROP TABLE</code> statement, it's even longer than <code>INSERT</code> statement. Why dropping table is longer than copying data from one table to another?
  Thanks in advance!</p>