How to debug schema version of sqlite database in moor flutter

Short answers to complex questions. To check the schema version of a moor created database you will need to use a PRAGMA statement. As the documentation puts it:

The PRAGMA statement is an SQL extension specific to SQLite and used to modify the operation of the SQLite library or to query the SQLite library for internal (non-table) data.

Long story short, moor uses the default name for the sqlite schema. In SQLite, the default schema is called `main`. Running the PRAGMA `schema_version` command on the main schema will do the trick!

PRAGMA main.schema_version;

Read more on migrations at the official moor plugin documentation here: https://moor.simonbinder.eu/docs/advanced-features/migrations/

Read more on SQLite pragma statements at: https://www.sqlite.org/pragma.html#pragma_schema_version