aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/commands/dbconsole
Commit message (Collapse)AuthorAgeFilesLines
* [Railties] require_relative => requireAkira Matsuda2017-10-211-1/+1
| | | | This basically reverts 618268b4b9382f4bcf004a945fe2d85c0bd03e32
* Fix `can't modify frozen String` error in `DBConsole`yuuji.yaginuma2017-08-291-1/+1
| | | | | | | | | Without this, `dbconsole` raises an error as follwing: ``` RuntimeError: can't modify frozen String railties/lib/rails/commands/dbconsole/dbconsole_command.rb:79:in `start' ```
* Adding frozen_string_literal pragma to Railties.Pat Allan2017-08-141-0/+2
|
* Railties updates for frozen string literals.Pat Allan2017-08-141-1/+1
|
* Set `RAILS_ENV` before load application fileyuuji.yaginuma2017-07-171-1/+4
| | | | | | | Since #29725, load application file when `dbconsole` command is executed. However, if do not set `RAILS_ENV` before reading the application file, can not connect to the env specified in option, so added the setting of `RAILS_ENV`.
* Properly expand the environment's nameRobin Dupret2017-07-161-3/+0
| | | | | | | | | Running the `console` and `dbconsole` commands with a regular argument as the environment's name automatically expand it to match an existing environment (e.g. dev for development). This feature wasn't available using the `--environment` (a.k.a `-e`) option.
* Allow to pass a connection to the `dbconsole` commandRobin Dupret2017-07-161-2/+14
| | | | | | | | | | | Since 0a4f6009, it's possible to specify a 3-level database configuration to gather connections by environment. The `dbconsole` command will try to look for a database configuration which points to the current environment but with such flavour, the environment key is flushed out so let's add the ability to specify the connection and pick `primary` by default to be consistent with Active Record.
* Load environment file in `dbconsole` commandyuuji.yaginuma2017-07-091-0/+1
| | | | | | | | | Currently the environment file is not loaded in `dbconsole` command. Therefore, for example, if use encrypted secrets values in database.yml, `read_encrypted_secrets` will not be true, so the value can not be used correctly. Fixes #29717
* [Railties] require => require_relativeAkira Matsuda2017-07-011-1/+1
|
* Use appropriate type to `header` optionyuuji.yaginuma2017-04-051-1/+1
| | | | | The `header` option checks only whether it is specified or not. https://github.com/rails/rails/blob/e8c33349bfabca28996ac74d344d69c7aaffec50/railties/lib/rails/commands/dbconsole/dbconsole_command.rb#L52
* Privatize unneededly protected methods in RailtiesAkira Matsuda2016-12-251-3/+3
|
* remove unused requireyuuji.yaginuma2016-11-051-3/+0
| | | | YAML and ERB were removed at 971d510
* Hide commands from API site.Kasper Timm Hansen2016-10-281-1/+1
| | | | | They're just barren on the site and confure more than guide, instead rely on the built in --help to guide users.
* Fix dbconsole tests.Kasper Timm Hansen2016-09-251-6/+4
|
* Initial command structure.Kasper Timm Hansen2016-09-251-0/+160