drizzle-team / drizzle-team/drizzle-orm
[FEATURE]: Ability to check if running on the latest migration
Open
drizzle/kit
enhancement
- Dominant language
- TypeScript
- Stars
- 35.8k
- Forks
- 1.6k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 4
Description
### Describe what you want
When my app starts, I want to show an error or warning when the database is not on the latest migration.
Currently I can only run migrate, like this:
```js
import { migrate } from 'drizzle-orm/postgres-js/migrator';
await migrate(db, { migrationsFolder });
```
And I would like to be able to do this:
```js
import { checkMigration } from 'drizzle-orm/postgres-js/migrator';
const isOnLatestDbMigration = await checkMigration(db, { migrationsFolder });
```
Thank you for creating and maintaining Drizzle. Its great!
Contributor guide
Assessment
This issue has not been assessed yet.