rails/railties/test/application/rake
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
..
dbs_test.rb Merge pull request #35768 from robertomiranda/r/rake-db-prepare 2019-04-02 15:33:57 -04:00
dev_test.rb Respect config setting when output deprecation notice in rake tasks 2018-09-04 20:06:54 +09:00
framework_test.rb Adding frozen_string_literal pragma to Railties. 2017-08-14 19:08:09 +02:00
initializers_test.rb Respect config setting when output deprecation notice in rake tasks 2018-09-04 20:06:54 +09:00
log_test.rb Run in-app rails commands via fork+load where possible 2017-09-04 20:19:39 +09:30
migrations_test.rb Fix CustomCops/AssertNot to allow it to have failure message 2018-05-13 11:32:47 +09:00
multi_dbs_test.rb Handle up/down for multiple databases 2019-04-19 13:14:24 -04:00
notes_test.rb Respect config setting when output deprecation notice in rake tasks 2018-09-04 20:06:54 +09:00
restart_test.rb Run in-app rails commands via fork+load where possible 2017-09-04 20:19:39 +09:30
routes_test.rb Remove the Amazon SES ingress 2019-04-14 12:15:54 -04:00
tmp_test.rb Run in-app rails commands via fork+load where possible 2017-09-04 20:19:39 +09:30