mirror of
https://github.com/TECHNOFAB11/dbmate.git
synced 2025-12-12 08:00:04 +01:00
Update README.md
This commit is contained in:
parent
c402613c6c
commit
1d2493d2be
1 changed files with 10 additions and 2 deletions
12
README.md
12
README.md
|
|
@ -47,9 +47,17 @@ $ cat .env
|
|||
DATABASE_URL="postgres://postgres@127.0.0.1:5432/myapp_development?sslmode=disable"
|
||||
```
|
||||
|
||||
It is [generally recommended](https://github.com/bkeepers/dotenv#should-i-commit-my-env-file) to commit this file to source control, to make it easier for other developers to get up and running with your project. However, this is completely up to your personal preference.
|
||||
`DATABASE_URL` should be specified in the following format:
|
||||
|
||||
> Note: When connecting to Postgres, you may need to add the `sslmode=disable` flag to your connection URL, as dbmate by default requires an SSL/TLS connection (some other frameworks/languages use unencrypted connections by default).
|
||||
```
|
||||
protocol://username:password@host:port/database_name?options
|
||||
```
|
||||
|
||||
* `protocol` must be either `mysql` or `postgres`
|
||||
* `host` can be specified either as a hostname or IP address
|
||||
* `options` are driver-specific (refer to the underlying Go SQL drivers if you wish to use these)
|
||||
|
||||
> Note: When connecting to Postgres, you may need to add the `sslmode=disable` option to your connection string, as dbmate by default requires an SSL/TLS connection (some other frameworks/languages allow unencrypted connections by default).
|
||||
|
||||
### Creating Migrations
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue