Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

83
Views
AdonisJS migrations not running on test database

Recently started working on a project where AdonisJS is used and I am trying to beef up the test coverage.

Followed the documentation and setup the .env.testing file

HOST=knab-54-api
PORT=4021
NODE_ENV=testing

DB_CONNECTION=pg
DB_HOST=knab-54-api_postgres_1
DB_PORT=5432
DB_USER=knab54api
DB_PASSWORD=knab4api
DB_DATABASE=knab54api-test

Also updated the vowfile.js file

// Uncomment when want to run migrations
const ace = require('@adonisjs/ace')

await ace.call('migration:run', {}, { silent: true })

await ace.call('migration:reset', {}, { silent: true })

As far as setup goes, that should be all you need right?

However, when I run a test, only the adonis_schema table is created in the database, none of the migrations appear to run, but I always get a migration success message

Database migrated successfully in 5.82 s

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!