react-native-nitro-sqlite-drizzleFunctions
migrate
TypeScriptSource files: TypeScript
migrate<TSchema>(db, config): Promise<void>
Apply the migrations that drizzle-kit generated and that have not run on this database yet. Pending migrations run in one transaction and roll back together on failure. Calls sharing a connection wait for earlier calls before reading migration history. A failed call does not prevent later calls from retrying.
Type Parameters
TSchema
TSchema extends Record<string, unknown>
Tables and relations supplied to Drizzle.
Parameters
db
NitroSQLiteDatabase<TSchema>
Database returned by drizzle().
config
The migrations.js module that drizzle-kit generates.
Returns
Promise<void>
Resolves when all pending migrations finish.
Throws
Rejects if a journal entry has no SQL, or a query or transaction fails.