use mutable list to register migrations#568
use mutable list to register migrations#568timohuber wants to merge 1 commit intooxidizing:masterfrom
Conversation
|
@aronerben Updated PR using a mutable list to store the registered migration. For some reason, the migrations are registered in the reversed order, we register the services. For example: Will create migrations in the following order: Do you know why this behaves like this? |
|
@timohuber Hmm, the implementation seems correct. Could you figure out where this reversal happens by logging? For example, is it reversed in |
|
@aronerben Sorry, I was unclear. This behavior is not directly related to this PR. The services are started in a different order than passed to the |
|
@timohuber |
|
@aronerben Yes, you are right. migrations are run first. Do you have an idea how we can ensure that all migrations from The current workaround is to prefix them to make sure they are executed last in alphabetical order. |
|
@timohuber Technically, if you register your own services and make them dependent on the corresponding Sihl service it depends on, the migration should be run after the Sihl migration... Would that work? Otherwise we just separate Sihl migrations and custom migrations via the way you suggested. (Of course, the cleanest solution would be to rework the migration system, as was planned in Sihl 4.0...) |
No description provided.