ribesg
03/26/2024, 10:23 AMDatabase.Schema.migrate(…)
manually or not?
https://cashapp.github.io/sqldelight/2.0.1/multiplatform_sqlite/migrations/
The documentation describes how to define migrations, states that These SQL statements are run by the Database.Schema.migrate() method
but then If you run your migration from code
. What does If
mean? It's optional after all?Benoit Quenaudon
03/26/2024, 12:06 PMIf
means In the case of
: you have the possibility to run this code yourself.ribesg
03/26/2024, 12:43 PMBenoit Quenaudon
03/26/2024, 12:47 PMDerek Ellis
03/26/2024, 1:24 PMribesg
03/26/2024, 1:28 PMDatabase.Schema.migrate()
as there don't seem to be a way to know what the current version of the db file is. Are you supposed to store it somewhere else? Or maybe it's platform specificjw
03/26/2024, 1:31 PMjw
03/26/2024, 1:32 PMribesg
03/26/2024, 1:32 PMjw
03/26/2024, 1:33 PMmigrate()
yourself.jw
03/26/2024, 1:33 PMjw
03/26/2024, 1:34 PMjw
03/26/2024, 1:34 PMribesg
03/26/2024, 1:34 PMribesg
03/26/2024, 1:39 PMDatabase.Schema.migrate()
if I want to? Won't it be called twice then?jw
03/26/2024, 1:40 PMjw
03/26/2024, 1:40 PMDerek Ellis
03/26/2024, 1:40 PMribesg
03/26/2024, 1:50 PMDatabase.Schema.migrate()
. On Android & iOS, I just let it work automatically. Right?Derek Ellis
03/26/2024, 2:00 PM