Skip to content

Commit 83f3048

Browse files
committed
Moved the documentation to ./bin/rails db: section
1 parent 8c2e665 commit 83f3048

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

guides/source/command_line.md

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -93,30 +93,6 @@ development:
9393

9494
It generated a database configuration corresponding to our choice of PostgreSQL.
9595

96-
### Switching to a Different Database Later
97-
98-
After creating a new Rails application, you have the option to switch to any
99-
other supported database. For example, you might work with SQLite for a while and
100-
then decide to switch to PostgreSQL. In this case, you only need to run:
101-
102-
```bash
103-
$ rails db:system:change --to=postgresql
104-
conflict config/database.yml
105-
Overwrite config/database.yml? (enter "h" for help) [Ynaqdhm] Y
106-
force config/database.yml
107-
gsub Gemfile
108-
gsub Gemfile
109-
...
110-
```
111-
112-
And then install the missing gems:
113-
114-
```bash
115-
$ bundle install
116-
...
117-
118-
```
119-
12096
### Skipping Defaults
12197

12298
If you wish to skip some files from being generated or skip some libraries
@@ -575,6 +551,30 @@ The most common commands of the `db:` rails namespace are `migrate` and `create`
575551
576552
More information about migrations can be found in the [Migrations](active_record_migrations.html) guide.
577553
554+
#### Switching to a Different Database Later
555+
556+
After creating a new Rails application, you have the option to switch to any
557+
other supported database. For example, you might work with SQLite for a while and
558+
then decide to switch to PostgreSQL. In this case, you only need to run:
559+
560+
```bash
561+
$ rails db:system:change --to=postgresql
562+
conflict config/database.yml
563+
Overwrite config/database.yml? (enter "h" for help) [Ynaqdhm] Y
564+
force config/database.yml
565+
gsub Gemfile
566+
gsub Gemfile
567+
...
568+
```
569+
570+
And then install the missing gems:
571+
572+
```bash
573+
$ bundle install
574+
...
575+
576+
```
577+
578578
### `bin/rails notes`
579579
580580
`bin/rails notes` searches through your code for comments beginning with a specific keyword. You can refer to `bin/rails notes --help` for information about usage.

0 commit comments

Comments
 (0)