On Dec 24, 2015, at 11:17 AM, Warren Young <wyml at etr-usa.com> wrote:
> 
>   BEGIN TRANSACTION;
>   ALTER TABLE Foo RENAME TO oldFoo;
>   CREATE TABLE Foo ? a bunch of repeated stuff 
>                    ? almost identical to the initial
>                    ? DBMS creation code with just one
>                    ? or two differences yet everything
>                    ? that has stayed the same still has
>                    ? to be repeated just because SQLite
>                    ? doesn?t fully support ALTER TABLE
>   INSERT INTO Foo SELECT some,subset,of,columns FROM oldFoo;
>   COMMIT;
> 
> It would be entirely possible for SQLite to generate and run this code for 
> me.  Writing such code is a waste of human brain power.

On re-reading this, I see that there is a bug in that code, which only 
underscores my point: I wouldn?t have made the error if I?d only had to write

   ALTER TABLE Foo DROP COLUMN bar;

Reply via email to