SQLite Audit Kit / full scan
What changed in your database?
A reproducible comparison of schema, exact counts and selected constraints. Row changes, NULL changes and mixed SQLite storage types are observations; they do not automatically mean a regression.
Supported tables3Union of before / after
Schema changes1Tables with structural or DDL changes
Foreign-key violations0 → 1Exact counts in supported tables
Regression findings2Defined checks, no health score
Regression gate
REGRESSION- Duplicate key counts increased in readings (sample_key)
- Foreign-key violation count increased in readings
Fails on increased FK violations per table, increased selected-key duplicate counts, or a failed after integrity check. Different key coverage or unsupported tables prevent a complete pass.
Row counts at a glance
Up to twelve largest tables. Missing tables use an em dash; a zero is an empty table.
devices
unchangedRows 2 → 2 · Δ +0
| Column | NULL count | NULL share | Actual storage types: before → after |
|---|---|---|---|
| id | 0 → 0Δ +0 | 0.0% → 0.0% | integer 2→ integer 2 |
| name | 0 → 0Δ +0 | 0.0% → 0.0% | text 2→ text 2 |
No candidate key was selected for this table.
pending_records
unchangedRows 0 → 0 · Δ +0
| Column | NULL count | NULL share | Actual storage types: before → after |
|---|---|---|---|
| id | 0 → 0Δ +0 | — → — | empty→ empty |
| note | 0 → 0Δ +0 | — → — | empty→ empty |
No candidate key was selected for this table.
readings
changedRows 5 → 6 · Δ +1
| Column | NULL count | NULL share | Actual storage types: before → after |
|---|---|---|---|
| calibration_state | — → 0Δ — | — → 0.0% | —→ text 6 |
| device_id | 0 → 0Δ +0 | 0.0% → 0.0% | integer 5→ integer 6 |
| id | 0 → 0Δ +0 | 0.0% → 0.0% | integer 5→ integer 6 |
| label | 1 → 1Δ +0 | 20.0% → 16.7% | null 1 text 4→ null 1 text 5 |
| payload | 4 → 5Δ +1 | 80.0% → 83.3% | blob 1 null 4→ blob 1 null 5 |
| sample_key | 1 → 1Δ +0 | 20.0% → 16.7% | null 1 text 4→ null 1 text 5 |
| sensor_value | 1 → 3Δ +2 | 20.0% → 50.0% | integer 1 null 1 real 2 text 1→ null 3 real 2 text 1 |
Selected key checks
| Columns | Duplicate groups | Excess rows | Rows excluded: any NULL |
|---|---|---|---|
| sample_key | 0 → 1 | 0 → 1 | 1 → 1 |
Inspect 3 schema changes
[
{
"kind": "column_changed",
"name": "calibration_state",
"before": null,
"after": {
"declared_type": "TEXT",
"default_sql": "'raw'",
"hidden": 0,
"name": "calibration_state",
"not_null": false,
"primary_key_position": 0
}
},
{
"kind": "index_changed",
"name": "readings_device_idx",
"before": null,
"after": {
"columns": [
{
"collation": "BINARY",
"descending": false,
"key": true,
"name": "device_id",
"position": 0
},
{
"collation": "BINARY",
"descending": false,
"key": false,
"name": null,
"position": 1
}
],
"name": "readings_device_idx",
"origin": "c",
"partial": false,
"sql": "CREATE INDEX readings_device_idx ON readings(device_id)",
"unique": false
}
},
{
"kind": "table_sql_changed",
"before": "CREATE TABLE readings (\n id INTEGER PRIMARY KEY,\n device_id INTEGER NOT NULL REFERENCES devices(id),\n sample_key TEXT,\n sensor_value NUMERIC,\n label TEXT,\n payload BLOB\n )",
"after": "CREATE TABLE readings (\n id INTEGER PRIMARY KEY,\n device_id INTEGER NOT NULL REFERENCES devices(id),\n sample_key TEXT,\n sensor_value NUMERIC,\n label TEXT,\n payload BLOB\n , calibration_state TEXT DEFAULT 'raw')"
}
]SQLite diagnostics and audit scope
{
"integrity": {
"before": {
"may_be_truncated": false,
"message_limit": 100,
"messages": [
"ok"
],
"ok": true
},
"after": {
"may_be_truncated": false,
"message_limit": 100,
"messages": [
"ok"
],
"ok": true
}
},
"foreign_keys": {
"before": {
"by_table": [],
"checked": true,
"details": [],
"details_truncated": false,
"error": null,
"violation_count": 0
},
"after": {
"by_table": [
{
"table": "readings",
"violations": 1
}
],
"checked": true,
"details": [
{
"constraint_id": 0,
"parent": "devices",
"table": "readings"
}
],
"details_truncated": false,
"error": null,
"violation_count": 1
},
"delta": 1
},
"unsupported_tables": {
"before": [],
"after": []
}
}