What problem are you trying to solve?
Currently, adding/removing NOT NULL and CHECK constraints performs a table rebuild in SQLite. It would be more efficient to use ALTER TABLE statements.
Describe the solution you'd like
The table rebuild could be simplified by issuing much simpler ALTER TABLE statements instead.
This is new in SQLite 3.53.3 (see 3.a.)
New SQL language features: Enhance ALTER TABLE to permit adding and removing NOT NULL and CHECK constraints.
Note that this would probably require to detect the actual SQLite version being used to know if the new ALTER TABLE statements can be used or if it must fallback to a table rebuild, which might be tricky.
What problem are you trying to solve?
Currently, adding/removing NOT NULL and CHECK constraints performs a table rebuild in SQLite. It would be more efficient to use
ALTER TABLEstatements.Describe the solution you'd like
The table rebuild could be simplified by issuing much simpler
ALTER TABLEstatements instead.This is new in SQLite 3.53.3 (see 3.a.)
Note that this would probably require to detect the actual SQLite version being used to know if the new
ALTER TABLEstatements can be used or if it must fallback to a table rebuild, which might be tricky.