Thanks to visit codestin.com
Credit goes to github.com

Skip to content

knex migrations directory is corrupt error in production environment  #5177

@dschwan21

Description

@dschwan21

Environment

Knex version: 2.0.0
Database + version: PostgreSQL 14
OS: Mac 12.3

Bug

  1. Explain what kind of behavior you are getting and how you think it should do
    I am trying to run knex migrations on a deployed postgresql database in production environment and am getting a corrupt migrations directory error. My development environment is not having the issues as I can run the migrations and seeds fine locally. The files that are supposedly missing in the migrations directory are from a completely different node project and for some reason they are persisting here and throwing an error. This is the error I am getting with command:
    knex migrate:latest --env production

  2. Error message
    Error: The migration directory is corrupt, the following files are missing: 20210424213729_create-users-table.js, 20210424214505_create-courses-table.js, 20210426013441_create-module-table.js

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions