Hello @hwbest - There isn’t an API available to query the library version that created the database. As you noted, PRAGMA cipher_version returns the current version of the library, not the database version.
One technique that we’ve used to manage migrations is discussed here, and presents a fairly well optimized technique for determining whether a database needs to be migrated: