Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

84
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda