PRAGMA foreign_keys = ON;Foreign key enforcement is connection-specific and should usually be enabled explicitly by applications.
High-signal PRAGMA commands for foreign keys, cache, synchronous settings, page size, temp storage, health checks, and general SQLite administration.
Enable important safety settings and inspect database health.
PRAGMA foreign_keys = ON;Foreign key enforcement is connection-specific and should usually be enabled explicitly by applications.
PRAGMA foreign_keys;Useful when debugging unexpected orphan rows or migration behavior.
PRAGMA foreign_key_check;A great migration verification step.
PRAGMA quick_check;Faster than a full integrity check and handy for routine validation.
Inspect or tune journaling, cache, and storage behavior.
PRAGMA page_size;Page size is part of the file format and relevant for some performance and storage investigations.
PRAGMA cache_size = -20000;Negative values are interpreted as kibibytes, making sizing easier in some deployments.
PRAGMA synchronous = NORMAL;A common setting in WAL mode when balancing performance and durability.
PRAGMA temp_store = MEMORY;Can help workloads that build temporary btrees, sorts, or transient intermediate results.
PRAGMA user_version;
PRAGMA user_version = 12;A simple and popular migration bookkeeping mechanism in SQLite apps.