Closed Zer0-213 closed 2 months ago
Hello, you need to run the migrations using the library, as shown in the README example.
import { Migrations } from 'expo-sqlite-orm'
const migrations = useMemo(() => new Migrations(databaseName, statements), [])
const onPressRunMigrations = async () => {
await migrations.migrate()
}
const onPressReset = async () => {
await migrations.reset()
}
You need to manually create your migrations with an ascending key and execute the necessary SQL in the migration. The library will manage which migrations have already been executed. See more at the link.
https://github.com/dflourusso/expo-sqlite-orm?tab=readme-ov-file#migrations
Perfect thank you. Closing the issue
Hi I am writing up migrations for my project with this library. I wanted to ask if migrations that are stored in the db run or are they checked by the library?