# How will I check if the database file is SQLCiper3.5 or SQLCipher4.1?

**URL:** <https://discuss.zetetic.net/t/how-will-i-check-if-the-database-file-is-sqlciper3-5-or-sqlcipher4-1/3661>\
**Category:** SQLCipher\
**Created:** [May 10, 2019, 8:02pm UTC](https://discuss.zetetic.net/t/how-will-i-check-if-the-database-file-is-sqlciper3-5-or-sqlcipher4-1/3661 "2019-05-10T20:02:59Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![mmoore](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/mmoore/32/858_2.png) [@mmoore](https://discuss.zetetic.net/u/mmoore)\
**Post date:** [May 10, 2019, 8:06pm UTC](https://discuss.zetetic.net/t/how-will-i-check-if-the-database-file-is-sqlciper3-5-or-sqlcipher4-1/3661/2 "2019-05-10T20:06:37Z")

</div>

Hi @lancecontreras

Typically the flow is: attempt to open the database, if it fails, attempt to migrate, if that fails then the key material is incorrect.

My colleague @sjlombardo gave further details in his response here: [Upgrading to SQLCipher 4](https://discuss.zetetic.net/t/upgrading-to-sqlcipher-4/3283/17)

---

_[View the full topic](https://discuss.zetetic.net/t/how-will-i-check-if-the-database-file-is-sqlciper3-5-or-sqlcipher4-1/3661)._
