Skip to content

Commit 8c2e665

Browse files
committed
Added documentation for rails db:system:change command
1 parent fb3dff3 commit 8c2e665

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

guides/source/command_line.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,30 @@ 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+
96120
### Skipping Defaults
97121

98122
If you wish to skip some files from being generated or skip some libraries

0 commit comments

Comments
 (0)