SQLite Forum

Apparent bug in ALTER TABLE
Well, in that case the documentation is incomplete, since the description of ALTER TABLE contains no such statement.

I can understand why the implementation of the new version of ALTER TABLE needs to scan the schema to check if any other tables or views need to be updated, but the behaviour that Dan has described is not necessary to implement the new version. The legacy version scanned the schema too in the case where a column is renamed. A schema containing a view with a missing reference is valid, even if a little perverse, and might for example exist if another user is performing the sequence of actions described for making changes to a table which ALTER TABLE can't do. I found this issue when testing an application which does exactly that.