Migration does not quit


#1

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!


#2

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?


#3

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.


#4

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


#5

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)?


#6

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


#7

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


#8

@ntvsx193 I tried but it did not work