From 5cb7ab673d7cb8722170e63d9b2f351a57bd398c Mon Sep 17 00:00:00 2001 From: Freek Wielstra Date: Sat, 26 Feb 2022 00:58:57 +0100 Subject: [PATCH] Update README.md (#316) --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 94fb87651..7994309c5 100644 --- a/README.md +++ b/README.md @@ -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) }