npx knex migrate:list doesn't print a readable list of completed migrations files
See original GitHub issueEnvironment
Knex version: 1.0.1 Database + version: PostgreSQL 12.7 OS: macOS 11.6.2
Bug
npx knex migrate:list
produces
[object Object]
[object Object]
[object Object]
No Pending Migration files Found.
Previous version (0.95) listed the filenames of completed migrations:
20220119154150_x.ts
20220119155840_y.ts
20220120081602_z.ts
No Pending Migration files Found.
- Error message
No error message, just a bit inconvenient to read 😃
- Reduced test code, for example in https://npm.runkit.com/knex or if it needs real database connection to MySQL or PostgreSQL, then single file example which initializes needed data and demonstrates the problem.
Run npx knex migrate:list
with at least one completed migration.
I think the fix is to say completed[i].name
here https://github.com/knex/knex/blob/1744c8c2655a8362260ba987d706ec3473681a78/bin/utils/migrationsLister.js#L16
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:5
Top Results From Across the Web
Migrations | Knex.js
Once you have a knexfile.js, you can use the migration tool to create migration files to the specified directory (default migrations).
Read more >Knex.js Migrations copy existing data to other table
js migration, copy data from one table to another ? The use case is as follows: I have a table A, which I...
Read more >find file count including directory linux Code Example
find -maxdepth 1 -type d | while read -r dir; do printf "%s:\t" "$dir" ... a shell script to list all of the...
Read more >9 Best JavaScript and TypeScript ORMs for 2022 - SitePoint
An ORM library simplifies the job of writing database queries. Learn about nine JS and TypeScript ORMs and how they could help you...
Read more >Configuration Options | Directus Docs
Environment variables are used for all configuration within a Directus ... By default, Directus will read the .env file located next to your ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Will be fixed in 1.0.2, sorry!
I’m on version 1.0.3 and am still encountering the issue.
Thanks.