Migration does not quit

I’m using “adonis migration:run” to generate mySQL database and I have 23 migration files to run.
When I typed “adonis migration:run” in command line, adonis generated my database but not stop processing.
I need some help to fix it.

Sorry, my English is bad. Hope you understand what I mean.
Thank you so much!

1 Like

Hey @linhnguyen! :wave:

As a workaround you can simply use CMD+C to kill the process.

Did all your migrations look the same or you have special one that seed data at the same time?

I have used CMD+C to kill it but I also want the process auto quit because I am using CI,CD on my product server.

For sure, did all your migrations look the same or you have special one that seed data at the same time?

In my application I make use of the afterProvidersBooted hook which also affects ace commands and results in the same behavior. Do you have implemented something like this (e.g. in the hooks.js)?

I think, It should be fixed simple with await Database.close()

@Ringelnatz May be you’re right. I handle many error exceptions in the hook.js

@ntvsx193 I tried but it did not work

Hi @romain.lanz, hi @Ringelnatz!

I have the same issue. My migrations look all the same and I have no seed.
Do you have a hint for me?

BR

Has anyone figured this out?

I am having the same problem. My database connections need to be explicitly closed because they are tunneled thru an ssh connection.

They aren’t getting closed. When I seed the database the connection doesn’t close and finish…

There is no Hook for ‘database is idle’ or ‘database work is done’

1 Like

I fixed my improper handling of the connection in my custom knex dialect.

Every time migration assistant gets within 20 minutes of finishing, it shows an alert stating “migration assistant quit unexpectedly.” I just want my stuff back :frowning: