Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error message for missing migration files #4937

Merged
merged 1 commit into from
Jan 17, 2022

Commits on Jan 17, 2022

  1. Fix error message for missing migration files

    This was caused by this change 1.0
    
    > Changed Migrator to return list of migrations as objects consistently.
    
    I'm not sure how / if I should add tests for this. Let me know if you'd like them :)
    
    This fixes the following error:
    
    ```
    $ (createdb luma-test &> /dev/null || true) && knex migrate:latest --env test && node -r esbuild-register ./node_modules/knex/bin/cli.js seed:run --env test --specific=seed_db.ts && NODE_ENV=test jest --runInBand
    Using environment: test
    The migration directory is corrupt, the following files are missing: [object Object]
    Error: The migration directory is corrupt, the following files are missing: [object Object]
        at validateMigrationList (/Users/victor/Code/luma/node_modules/.pnpm/knex@1.0.1_pg@8.7.1/node_modules/knex/lib/migrations/migrate/Migrator.js:566:11)
        at Migrator.latest (/Users/victor/Code/luma/node_modules/.pnpm/knex@1.0.1_pg@8.7.1/node_modules/knex/lib/migrations/migrate/Migrator.js:69:7)
        at processTicksAndRejections (node:internal/process/task_queues:96:5)
        at async Command.<anonymous> (/Users/victor/Code/luma/node_modules/.pnpm/knex@1.0.1_pg@8.7.1/node_modules/knex/bin/cli.js:232:32)
    ```
    vpontis committed Jan 17, 2022
    Configuration menu
    Copy the full SHA
    481c6da View commit details
    Browse the repository at this point in the history