mirror of https://github.com/pressly/goose.git
Update README.md (#316)
parent
699287dd75
commit
5cb7ab673d
|
@ -256,7 +256,10 @@ This feature can be used only for applying existing migrations. Modifying operat
|
|||
`fix` and `create` will continue to operate on OS filesystem even if using embedded files. This is expected
|
||||
behaviour because `io/fs` interfaces allows read-only access.
|
||||
|
||||
Example usage (assuming sql migrations placed in `migrations` directory):
|
||||
Make sure to configure the correct SQL dialect, see [dialect.go](./dialect.go) for supported SQL dialects.
|
||||
|
||||
Example usage, assuming that SQL migrations are placed in the `migrations` directory:
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
|
@ -276,6 +279,10 @@ func main() {
|
|||
|
||||
goose.SetBaseFS(embedMigrations)
|
||||
|
||||
if err := goose.SetDialect("postgres"); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
if err := goose.Up(db, "migrations"); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue