Ionix database version

I am using the ionix-sqlite plugin in my app.
It is working perfectly but I just want to know if there is a way to update the database’s version to make it easier to test it.
I am currently opening my db this way:
SqlDatabase.open('test1.db', [createTable]); where createTable is a typical sql query.
The thing is, I am calling test1.db multiple times in my code and whenever I change something in my table’s structure I have to change the database’s name to test2.db or something everywhere.
Is there a way to update the database’s version or to reset it ?
Would be cool to be able to somehow pass Sql.Database.open() a version parameter.

Thanks

Nevermind actually I was confused because my table’s name was the same as my database’s and thought I had to change my table’s name everwhere but changing the db’s name in the open() function does the trick.

Agreed, support for schema evolution would be nice. I’ll look into adding it.

1 Like