The db has a meta value that is an integer. Its th...
# touchlab-tools
k
The db has a meta value that is an integer. Its the db version. If the db doesn’t exist, it creates it with whatever tables are defined, and sets that version to “1”. Every time it opens that db, it looks at the version, and if the schema version and the db version match, it does nothing. If you add tables, but don’t add a migration, sqldelight (and every other mobile sqlite library I’m aware of) does the same. You can delete the app and rerun it, and it’ll add all the tables, but on db start, it doesn’t try to interpret what tables you do/don’t have. It’s all driven by version
👍 1