Skip to content

Conversation

@vitorhugods
Copy link
Contributor

Fixes #11.

When creating SQLiteOpenHelper, the DB runtime version is being passed as both the version and the minimumSupportedVersion.

I tried to keep the compatibility with the current behaviour, although I'm not sure if that's wanted, and I believe 0 should be the default, and not configuration.callback.version.

I'm happy to simplify it and make 0 the default instead.

@vitorhugods
Copy link
Contributor Author

@developernotes I've added a couple of tests.

The one that fails is shouldRunUpgradeFromVersion1ToVersion2.

I think that minimumSupportedVersion should be 0 by default, and the current behaviour is that minimumSupportedVersion is equal to the Callback.version.

This PR doesn't fix the failing scenario by default, but adds another constructor that allows an constructor with explicit minimumSupportedVersion, which if used will pass the test.

If this was just a bug and minimumSupportedversion should be 0 by default, then I'll just make it that way. I just need a confirmation.

@developernotes developernotes merged commit 314c15f into sqlcipher:master Feb 9, 2023
@developernotes
Copy link
Member

Hi @vitorhugods,

Thank you for the pull request and added tests, I have merged this into master. I did have to make some minor modifications to the tests to get them to pass, please let me know if you have any questions or comments regarding that. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrations are always triggering a rebuild when using SupportOpenHelperFactory

2 participants