Skip to content

[BUG]: Migrations silently failing #3214

@L-Mario564

Description

@L-Mario564

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.

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
image

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdrizzle/kitpriorityWill be worked on next

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions