drizzle-team / drizzle-team/drizzle-orm
[BUG]: Migrations silently failing
- Dominant language
- TypeScript
- Stars
- 35.8k
- Forks
- 1.6k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 4
Description
### What version of `drizzle-orm` are you using?
?
### What version of `drizzle-kit` are you using?
?
### Describe the Bug
From drizzle-kit-mirror repo:
https://github.com/drizzle-team/drizzle-kit-mirror/issues/341
> When using the automatic migration runner, in my case the vercel-postgres one, if for some reason the generated migrations fail nothing will be outputted or returned. The output of the migrate function should be checked for thrown errors or at least be returned so it can be handled individually by developers.
>
> ```js
> import { readMigrationFiles } from "../migrator.js";
> async function migrate(db, config) {
> const migrations = readMigrationFiles(config);
> await db.dialect.migrate(migrations, db.session, config); // <---
> }
> export {
> migrate
> };
> //# sourceMappingURL=migrator.js.map
> ```
https://github.com/drizzle-team/drizzle-kit-mirror/issues/568
> drizzle-orm: 0.33.0 drizzle-kit: 0.24.2
>
> when dropping tables after previous migrations, new migrations fail silently
>
>
> but database has no tables
>
> **deleting the migrations folder with meta folder resolves the issue**
The two issues above seem to be related.
### Expected behavior
_No response_
### Environment & setup
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.