SQLite Forum

Removing not null constraint doesn't behave correctly
The problem with the 12-step algorithm is an enormous complexity in practice. If you want to apply changes to a table definition, it is not enough to drop and recrate your own views (which you know about), but in fact *all* views.

This is because a user might have added his own view referring to the table to be changed. So one has to read *all* view declarations, memorize them, drop them, and recreate them later.

But not enough, a view might have triggers in it, so again, one has to read *all* triggers (not only those you know about), memorize them, drop them, and recreate them later.

The 12-step ALTER-workaround is an extremely sophisticated and error-prone system. Instead of implementing it every time in every application, I really would love to see it finally being available in SQLite. Speed don't matter at all, but PLEASE, PLEASE, PLEASE provide full ALTER TABLE support 🙏