rails/railties/test
eileencodes f9244c6585 Handle up/down for multiple databases
This change adds the ability to run up/down for a database in a multi-db
environment.

If you have an app with a primary and animals database the following
tasks will be generated:

```
VERSION=123 rake db:migrate:up:primary
VERSION=123 rake db:migrate:up:primary

VERSION=123 rake db:migrate:down:primary
VERSION=123 rake db:migrate:up:animals
```

I didn't generate descriptions with them since we don't generate a
description for a single database application.

In addition to this change I've made it so if your application has
multiple databases Rails will raise if you try to run `up` or `down`
without a namespace. This is because we don't know which DB you want to
run `up` or `down` against unless the app tells us, so it's safer to
just block it and recommend using namespaced versions of up/down
respectively.

The output for the raise looks like:

```
You're using a multiple database application. To use `db:migrate:down`
you must run the namespaced task with a VERSION. Available tasks are
db:migrate:down:primary and db:migrate:down:animals.
```
2019-04-19 13:14:24 -04:00
..
application Handle up/down for multiple databases 2019-04-19 13:14:24 -04:00
command Fix deeply nested namespace command printing 2019-01-24 12:28:43 -05:00
commands Merge pull request #35906 from yoones/notes-tags-registration 2019-04-15 17:46:07 -04:00
configuration Adding frozen_string_literal pragma to Railties. 2017-08-14 19:08:09 +02:00
engine Make Webpacker the default JavaScript compiler for Rails 6 (#33079) 2018-09-30 22:31:21 -07:00
fixtures/lib Remove unused fixtures 2017-09-26 07:45:42 +09:00
generators Add null: false constraint by default for belongs_to associations 2019-04-19 20:08:29 +05:30
isolation Only retry tests on CI 2019-04-17 01:10:45 +02:00
minitest rubocop single space after assignment 2018-02-19 11:23:47 +05:30
railties Only override async adapter when seeding 2019-04-09 00:35:16 -07:00
test_unit Show rails instead of bin/rails on USAGE instructions 2018-07-06 22:46:54 +02:00
abstract_unit.rb Output junit format test report 2019-04-04 14:34:46 +09:00
app_loader_test.rb Turn on performance based cops 2018-07-23 15:37:06 -07:00
backtrace_cleaner_test.rb Find query_source_location using lazy Enumerator 2019-04-15 16:13:06 -07:00
code_statistics_calculator_test.rb use "minitest" consistently 2018-09-11 23:57:25 +02:00
code_statistics_test.rb Adding frozen_string_literal pragma to Railties. 2017-08-14 19:08:09 +02:00
console_helpers.rb Enable Performance/UnfreezeString cop 2018-09-23 08:56:55 +09:00
engine_test.rb Use assert_predicate and assert_not_predicate 2018-01-25 23:32:59 -05:00
env_helpers.rb Adding frozen_string_literal pragma to Railties. 2017-08-14 19:08:09 +02:00
generators_test.rb Do not show suggestion message when not exist suggestion 2018-12-29 18:57:55 +09:00
initializable_test.rb Adding frozen_string_literal pragma to Railties. 2017-08-14 19:08:09 +02:00
json_params_parsing_test.rb Adding frozen_string_literal pragma to Railties. 2017-08-14 19:08:09 +02:00
path_generation_test.rb Remove deprecated config.secret_token 2019-01-17 16:08:34 -05:00
paths_test.rb Use assert_predicate and assert_not_predicate 2018-01-25 23:32:59 -05:00
rack_logger_test.rb Change the empty block style to have space inside of the block 2018-09-25 13:19:35 -04:00
rails_info_controller_test.rb Fix secret_key_base for Railties 2019-03-13 16:41:29 -04:00
rails_info_test.rb Revert "Merge pull request #34387 from yhirano55/rails_info_properties_json" 2019-01-08 22:21:20 +01:00
secrets_test.rb Enable Style/RedundantBegin cop to avoid newly adding redundant begin block 2018-12-21 06:12:42 +09:00
version_test.rb Adding frozen_string_literal pragma to Railties. 2017-08-14 19:08:09 +02:00