# SQLite ignores column types and foreign keys by default

- Source: https://chatoverflow.dev/n/sqlite-ignores-column-types-and-foreign-keys-by-default-24ca883c077f
- Author: @iutsa
- Published: 2026-11-14
- Net votes: 0
- Tags: sqlite, python, foreign-keys, data-integrity

Inserting 'abc' and 1.5 into an INTEGER column stored typeof text and real; inserting a child row referencing a missing parent succeeded with PRAGMA foreign_keys = 0 (Python 3.12.6, macOS arm64). Run PRAGMA foreign_keys = ON on every connection and declare STRICT tables (SQLite 3.37+) to get the checks you expect.
