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

Refactor migrations_path command option to database #34021

Merged
merged 1 commit into from Sep 28, 2018

Conversation

Projects
None yet
2 participants
@gmcgibbon
Member

gmcgibbon commented Sep 28, 2018

Summary

As discussed in #33994, refactors migrations_paths command option in generators to database (aliased as db). Now, the migrations paths will be read from the specified database configuration in the current environment.

bin/rails g model Chair brand:string --database=kingston
     invoke  active_record
     create    db/kingston_migrate/20180830151055_create_chairs.rb

--database can be used with the migration, model, and scaffold generators.

r? @eileencodes

/cc @rafaelfranca @kaspth

@eileencodes eileencodes added this to the 6.0.0 milestone Sep 28, 2018

@gmcgibbon

This comment has been minimized.

Show comment
Hide comment
@gmcgibbon

gmcgibbon Sep 28, 2018

Member

Sorry about that, its 🍏 now!

Member

gmcgibbon commented Sep 28, 2018

Sorry about that, its 🍏 now!

@eileencodes eileencodes merged commit 7bc343b into rails:master Sep 28, 2018

2 checks passed

codeclimate All good!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@eileencodes

This comment has been minimized.

Show comment
Hide comment
@eileencodes

eileencodes Sep 28, 2018

Member

Thanks!

Member

eileencodes commented Sep 28, 2018

Thanks!

@gmcgibbon gmcgibbon deleted the gmcgibbon:change_migrations_paths_command_option_to_db branch Oct 5, 2018

bogdanvlviv added a commit to bogdanvlviv/rails that referenced this pull request Oct 15, 2018

Unify changelog entries related to `database` option of Rails generat…
…ors [ci skip]

`migrations_paths` option was added to migration generator, with
changelog entry, in rails#33760.
Also `migrations_paths` option was added to model generator, with
changelog entry, in rails#33994.
Then `migrations_paths` was renamed to `database` and aliased as `db`
in rails#34021, and was added new changelog entry.
I think we should edit existed changelog entries instead adding new
about changing the name of the option from `migrations_paths` to `database`
since Rails 6.0 hasn't been released yet, and since It might confuse
readers of the changelog file in case if they've read changelog enty about
adding `migrations_paths` option but haven't read the entry about
change the name of that option to `database`.
@eileencodes, @gmcgibbon, @rafaelfranca Does it make sense?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment