[native/sqlite] introduce function to set database version
Summary:
In the future there will be a need to update database version in different places, that being said extracting logic to separate function.
Additionally, added error handling which will detect if SQL was executed without failure.
Test Plan:
- Check if logged database version is propper (could be compared with user_version visible after connecting to the database).
- Check if the version is set correctly after migrations (to test eg. logout user, after this version should be set to the highest currently possible).
Reviewers: marcin, jon, atul, tomek
Reviewed By: marcin, atul, tomek
Subscribers: ashoat, tomek, atul, abosh
Differential Revision: https://phab.comm.dev/D5376