This is the basic structure I'm using in an app.
getDatabasePath
will handle any detail on unzip, copy, etc,
index
will do all the usual dirty work, including withDatabase
that won't explode if the database
is missing
WatermelonProvider
to cover original one til the DB is ready
Hey, @sidferreira I landed here after looking for ways to prepopulate one of the watermelondb table with the data from a asset, a sqlite db file. I am not able to make it work.
some_data.db
file inside www/assets in my react-native app.react-native-sqlite-storage
to read and write into the product database file.what I want is to add the content of this static database file into one of the table in watermelondb on app launch, I can't figure out how to do so yet. I tried the trick mentioned above but nothing happens it just loads the other modelClasses and tables.
IDK what I'm doing wrong, any help will be much appreciated.