Skip to content

Adds Rails 6.1 if_exists flags#165

Closed
humphreyja wants to merge 4 commits intoteoljungberg:masterfrom
humphreyja:master
Closed

Adds Rails 6.1 if_exists flags#165
humphreyja wants to merge 4 commits intoteoljungberg:masterfrom
humphreyja:master

Conversation

@humphreyja
Copy link

Rails 6.1 added if_exists flags to things like remove_column to assist with edge cases of migrations where the column was removed and possibly not readded in a rollback; basically putting your entire migration in a state of failure. Just ran across this with this gem, so this seems like a good addition.

Blog post showing how the if_exists flag works.
https://blog.saeloun.com/2020/02/10/rails-support-for-if-exists-if-not-exists-on-remove-column-add-column-in-migrations

@teoljungberg
Copy link
Owner

Great addition - I'm in favor. I'll circle back to this in a few days.

For context - this was introduced as rails/rails#38352 in 6.1

@teoljungberg
Copy link
Owner

The standardrb warnings is something I'd like to see get dealt with in this PR. I'll continue with refactoring once this is merged as I have some stylistic ideas that aren't on you as the contributor to deal with.

@teoljungberg
Copy link
Owner

Not having heard back for a while - I'm closing this. Feel free to open an issue or another PR to add support for this.

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.

2 participants