Last updated: November 29, 2026.
When a PHP schema browser starts seeing sqlite_stat1 after ANALYZE, filter the inventory instead of changing the database. SQLite stores query-planner statistics in that internal table. You can exclude it and still keep application virtual tables in the list.
SELECT name, type
FROM pragma_table_list
WHERE "schema" = 'main'
AND type IN ('table', 'virtual')
AND substr(name, 1, 7) <> 'sqlite_'
ORDER BY name;Choose which objects belong in the inventory
The query uses SQLite 3.37.0 or newer, which supports table_list. Change main only if you want to inspect a different attached schema. The type filter keeps ordinary and virtual tables, while excluding views and shadow tables. An FTS virtual table can remain visible even though its backing tables disappear from the results. If the UI should show views, add view to the list explicitly.
The prefix check excludes names starting with the literal characters sqlite_. A plain SQL LIKE pattern treats underscore as a wildcard unless escaped. A literal prefix comparison also makes the intent clear when the query is copied into a migration tool.
Compare the engine and the schema tool
Run the read-only query on a development copy. If it works but Doctrine table enumeration fails, capture the SQLite and DBAL versions and the object name that triggered the failure. Use the filtered result for a custom browse list while investigating the schema manager separately. The query does not change how Doctrine loads individual objects or generates migration diffs.
For an older SQLite runtime, a read-only query against main.sqlite_schema can exclude reserved names and select rows of type table. It cannot reliably identify every virtual-table shadow object using that type alone. Upgrade SQLite or use an explicit allowlist if the distinction matters.