Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
docs: add atlas to the list of supported migration frameworks
  • Loading branch information
andrewmbenton committed Sep 6, 2023
commit b67244e9d2cf125b836a73ccdea5cde9b5ed8ce4
17 changes: 17 additions & 0 deletions docs/howto/ddl.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ parsing SQL files.

sqlc supports parsing migrations from the following tools:

- [atlas](https://github.com/ariga/atlas)
- [dbmate](https://github.com/amacneil/dbmate)
- [golang-migrate](https://github.com/golang-migrate/migrate)
- [goose](https://github.com/pressly/goose)
Expand All @@ -51,6 +52,22 @@ sql:
out: "tutorial"
```

### atlas

```sql
-- Create "post" table
CREATE TABLE "public"."post" ("id" integer NOT NULL, "title" text NULL, "body" text NULL, PRIMARY KEY ("id"));
```

```go
package db

type Post struct {
ID int
Title sql.NullString
Body sql.NullString
}
```

### goose

Expand Down