I am trying to enable strict mode to require a datatype on every table column and enforce those types. as per this page.
$ sqlite3 ./a_new_database.sqlite
SQLite version 3.31.1 2020-01-27 19:55:54
Enter ".help" for usage hints.
sqlite> PRAGMA strict=ON;
sqlite> CREATE TABLE yay ( col1 TEXT, col2 INT );
sqlite> INSERT INTO yay ( col1, col2 ) VALUES ("this works", "this is the wrong type");
sqlite> SELECT * from yay;
this works|this is the wrong type
sqlite>
$
Not only can I INSERT the wrong datatype. I can also SELECT it.
I have tried PRAGMA strict=ON; and PRAGMA strict=1;. Neither works. I think I did not correctly enable strict mode.
How do I correctly enable strict mode?