Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Migrations are ordered name if migrations has name #146

Closed
KeNJiKunG opened this Issue · 9 comments

4 participants

@KeNJiKunG

Migration will ordered by migration's name if migration implemented getName method.

I don't know that this is intended behavior or not.

@mikeSimonson
Collaborator

That method should probably be final to avoid that.

@mikeSimonson mikeSimonson added this to the 1.0 milestone
@mikeSimonson
Collaborator

@Ocramius What about the BC break if I put the getName() method as final ?

It feels like it would be a bug to let it non final even thought it's probably going to break some people migrations.

@Ocramius
Owner

@mikeSimonson why would this be the correct solution in first place?

@mikeSimonson
Collaborator

@Ocramius Well I feel like it would be confusing to have one order in the folder and then a different order in the execution of the migration file because some name are overridden by the getName() but I am not sure that it's the best solution.

@mikeSimonson
Collaborator

It's related to this PR #100

@mikeSimonson
Collaborator

@Ocramius Is there a better solution to that issue than putting the getName as final ?

@Ocramius
Owner

@mikeSimonson I'm wondering if we can stop relying on getName in first place

@mikeSimonson
Collaborator

It looks like it would be possible.

The addition comes from this commit aab5b20 .

And the PR #100 would probably makes more sense in my opinion if the goal is to only have a more descriptive name.

It's not clear to me if that getName() was added when doctrine migration was tagged 1.0alpha1 or not and if removing it means a BC breaks.
It has been there for 4 years...

@stof
Collaborator

@mikeSimonson I think we could keep it for the descriptive name, but using a different (final) method for the sorting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.