Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

Commit

Permalink
Update README.md (pressly#316)
Browse files Browse the repository at this point in the history
  • Loading branch information
fwielstra authored Feb 25, 2022
1 parent 699287d commit 5cb7ab6
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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)
}
Expand Down

0 comments on commit 5cb7ab6

Please sign in to comment.