Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add flexible configuration option that allows to ignore legacy migrations #12

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

waterlink
Copy link
Contributor

fixes #10
related to #11

/cc @anthonyalberto

@alex-fedorov alex-fedorov mentioned this pull request Jan 27, 2015
@anthonyalberto
Copy link
Owner

Cool! Thanks for the contribution, really appreciated

I'm trying to think if a proc is really required here though. I can't see when it would be a good idea to ignore when version is greater of a given value for example.

What about just having a setting : config.active_record.mysql_online_migrations_min_version and if the value is stricly less than that, we just skip it.

Easier to configure and I think that covers the only use case I can think of

What do you think?

@waterlink
Copy link
Contributor Author

@anthonyalberto in most cases you don't need block.

But I have a project with multiple databases, where we have two independent migration sets with different versioning semantics, i.e.

20120508133018_ vs 017_

The only feasible way to do this for me is to use block

@waterlink
Copy link
Contributor Author

@anthonyalberto Hi, any news on this one, WDYT, is there any compromise to make it a very simple configuration option, but still leave a possibility to provide a custom ignoring mechanics?

@waterlink
Copy link
Contributor Author

How about having both mysql_online_migrations_ignore_before = "20120508133018" and mysql_online_migrations_ignore = -> (version) { ... custom logic here ... }

WDYT?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Is it possible to have it enabled only for some migrations instead of disabling them for some?
2 participants