Skip to content

Commit 774cf2b

Browse files
committed
feat(config): add docs for rc configs
refers to db-migrate/node-db-migrate#406 refers to db-migrate/node-db-migrate#308
1 parent 00f5726 commit 774cf2b

File tree

1 file changed

+30
-3
lines changed

1 file changed

+30
-3
lines changed

Getting Started/configuration.md

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,38 @@ In addition, the default env can also be set with an environment variable. This
8787
}
8888
```
8989

90-
Alternatively, you can specify a DATABASE_URL
91-
environment variable that will be used in place of the configuration
92-
file settings. This is helpful for use with Heroku.
90+
## DATABASE_URL
9391

92+
Alternatively, you can specify a `DATABASE_URL` environment variable that will
93+
be used in place of the configuration file settings. This is helpful for use
94+
with Heroku.
9495

96+
**Note**: If a database url is specified, the config file is being skipped. You
97+
can however also specify rc configs, where you can configure everything you can
98+
configure also on the CLI.
99+
100+
## RC configs
101+
102+
RC configs give the possibility to configure settings for more than just one
103+
project, as RC configs are being loaded from different directories.
104+
105+
You can take a view over [here](https://github.com/dominictarr/rc#standards)
106+
where to save those configs.
107+
108+
Most prominent locations are, the root directory where you currently execute
109+
db-migrate and your `HOME` directory. The file is always named .db-migraterc,
110+
except for some examples you can find under the link above.
111+
112+
An example .db-migraterc config file could look like this:
113+
114+
```json
115+
{
116+
"sql-file": true
117+
}
118+
```
119+
120+
This would set activate the sql mode unless you would deactivate it in your
121+
database.json again, which always has the highest priority.
95122

96123
## Important - For MySQL users
97124

0 commit comments

Comments
 (0)