react-native-nitro-sqlite-drizzleFunctions
useMigrations
TypeScriptSource files: TypeScript
useMigrations<TSchema>(db, migrations): MigrationState
Run migrate on mount and when the database or migration bundle changes.
Concurrent calls on the same connection are serialized, including Strict Mode
effect replays. Results from earlier inputs or after unmount do not update state.
Type Parameters
TSchema
TSchema extends Record<string, unknown>
Tables and relations supplied to Drizzle.
Parameters
db
NitroSQLiteDatabase<TSchema>
Database returned by drizzle().
migrations
The migrations.js module that drizzle-kit generates.
Returns
success once the migrations finished, or the error they failed with.