blob: 1f4c1c0b8ae6d75cb71f943bf6168f53f32ec6f0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
dbshell-rails
=============
A Rake task to launch a database shell, using the connection parameters
specified in your Rails application. The shell will be automatically connected
to the current environment's database.
The following databases are supported:
* PostgreSQL (runs `psql`)
* MySQL (runs `mysql`)
* SQLite (runs `sqlite3`)
After being a Djangonaut for a while and then doing more work in Rails, I was
surprised that it apparently has no equivalent to Django's
`./manage.py dbshell` command. This launcher program aims to provide that
missing functionality.
## Usage
$ rake dbshell
example_app_development=#
$ rails dbshell
example_app_development=#
$ RAILS_ENV=test rake dbshell
example_app_test=#
## Installation
Add this line to your application's Gemfile:
``` ruby
gem 'dbshell-rails'
```
And then execute:
$ bundle
## License
Copyright © 2017 Teddy Wing. Licensed under the GNU LGPLv3+ (see the included
COPYING & COPYING.LESSER files).
|