How to use SQLite 3 type affinity?
sqlite
Solution
Type affinity does not force column data types - it simply makes a suggestion as to how the underlying storage engine stores the data.
Under the "type affinity" section:
The type affinity of a column is the recommended type for data stored in that column. The important idea here is that the type is recommended, not required. Any column can still store any type of data.
(emphasis added)
As far as "how to turn it on," there's no such thing. This is how SQLite works all the time. There's nothing to turn on or off in order to get this functionality.
Problem
SQLite 3 documentation states "type affinity" enforces column data types. But how to turn it on?