@manwar It's called "type affinity" in #SQLite. If you have a column defined as "count INTEGER NOT NULL DEFAULT 0", there's nothing to stop you from inserting the value of "foo" into that column.
It's one of the reasons why I strongly recommend not using SQLite to simulate your database in the test suite: the subtle differences in behavior means your test suite might pass, even if your code is going to fail in production.
@manwar@ovid It's basically dynamic typing. In SQLite, each datum is typed separately and "column types" are more like suggestions.
That said, you can declare your table as strict to make SQLite behave more like other DBs. https://www.sqlite.org/stricttables.html
Add comment