Returns empty array when processing 0 of 0 instead of exception. #150

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants
@Incognito

This is consistent with other application behaviour.

Processing "0 of 1" and "1 of 1" migrations throws no exception,
but simply passes on an array(). "0 of 0" would turn out an exception
code which makes the script return an exit code to the system.

Returns empty array when processing 0 of 0 instead of exception.
This is consistent with other application behaviour.

Processing "0 of 1" and "1 of 1" migrations throws no exception,
but simply passes on an array(). "0 of 0" would turn out an exception
code which makes the script return an exit code to the system.
@mikeSimonson

This comment has been minimized.

Show comment Hide comment
@mikeSimonson

mikeSimonson Feb 14, 2015

Member

@Ocramius What do you think about the exit code ?

Member

mikeSimonson commented Feb 14, 2015

@Ocramius What do you think about the exit code ?

@Ocramius

This comment has been minimized.

Show comment Hide comment
@Ocramius

Ocramius Feb 14, 2015

Member

I think it is actually better to just leave the exception in place.

From an automation perspective, running an empty set of migrations seems to be a mistake and something that the user would know about. Thoughts?

Member

Ocramius commented Feb 14, 2015

I think it is actually better to just leave the exception in place.

From an automation perspective, running an empty set of migrations seems to be a mistake and something that the user would know about. Thoughts?

@mikeSimonson

This comment has been minimized.

Show comment Hide comment
@mikeSimonson

mikeSimonson Feb 15, 2015

Member

Well I guessing that if you are automating the deployment crashing because there were no migration to process makes the deploy code a little bit more complicated.
But I like that the user is warned that no migration were found.
Maybe we can change the exit code but then also show a message like warning the user, like those that warn that no sql query were run processing a migration file.

Member

mikeSimonson commented Feb 15, 2015

Well I guessing that if you are automating the deployment crashing because there were no migration to process makes the deploy code a little bit more complicated.
But I like that the user is warned that no migration were found.
Maybe we can change the exit code but then also show a message like warning the user, like those that warn that no sql query were run processing a migration file.

@Ocramius

This comment has been minimized.

Show comment Hide comment
@Ocramius

Ocramius Feb 15, 2015

Member

@mikeSimonson or add a flag --allow-no-migration-diff?

Member

Ocramius commented Feb 15, 2015

@mikeSimonson or add a flag --allow-no-migration-diff?

@mikeSimonson mikeSimonson referenced this pull request in doctrine/DoctrineMigrationsBundle May 6, 2015

Closed

app/console doctrine:migrations:migrate fails on no migrations #64

@mikeSimonson

This comment has been minimized.

Show comment Hide comment
@mikeSimonson

mikeSimonson Aug 27, 2015

Member

A similar option is added by #350

Member

mikeSimonson commented Aug 27, 2015

A similar option is added by #350

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment