Skip to content

Commit

Permalink
docs: Add example sqlc.yaml for migration parsing (#2479)
Browse files Browse the repository at this point in the history
* Add example sqlc.yaml for migration parsing

* Update docs/howto/ddl.md

---------

Co-authored-by: Kyle Conroy <kyle@conroy.org>
  • Loading branch information
samfweb and kyleconroy committed Jul 24, 2023
1 parent a5f57a9 commit dfe6aaa
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/howto/ddl.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,21 @@ sqlc supports parsing migrations from the following tools:
- [sql-migrate](https://github.com/rubenv/sql-migrate)
- [tern](https://github.com/jackc/tern)

To enable migration parsing, specify the migration directory instead of a schema file:

```yaml
version: "2"
sql:
- engine: "postgresql"
queries: "query.sql"
schema: "db/migrations"
gen:
go:
package: "tutorial"
out: "tutorial"
```
### goose
```sql
Expand Down

0 comments on commit dfe6aaa

Please sign in to comment.