Skip to content

Commit dfe6aaa

Browse files
samfwebkyleconroy
andauthored
docs: Add example sqlc.yaml for migration parsing (#2479)
* Add example sqlc.yaml for migration parsing * Update docs/howto/ddl.md --------- Co-authored-by: Kyle Conroy <kyle@conroy.org>
1 parent a5f57a9 commit dfe6aaa

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

docs/howto/ddl.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,21 @@ sqlc supports parsing migrations from the following tools:
3737
- [sql-migrate](https://github.com/rubenv/sql-migrate)
3838
- [tern](https://github.com/jackc/tern)
3939

40+
To enable migration parsing, specify the migration directory instead of a schema file:
41+
42+
```yaml
43+
version: "2"
44+
sql:
45+
- engine: "postgresql"
46+
queries: "query.sql"
47+
schema: "db/migrations"
48+
gen:
49+
go:
50+
package: "tutorial"
51+
out: "tutorial"
52+
```
53+
54+
4055
### goose
4156
4257
```sql

0 commit comments

Comments
 (0)