From b67244e9d2cf125b836a73ccdea5cde9b5ed8ce4 Mon Sep 17 00:00:00 2001 From: Andrew Benton Date: Tue, 5 Sep 2023 21:50:29 -0700 Subject: [PATCH] docs: add atlas to the list of supported migration frameworks --- docs/howto/ddl.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/howto/ddl.md b/docs/howto/ddl.md index 44b94b0174..4e9d36d855 100644 --- a/docs/howto/ddl.md +++ b/docs/howto/ddl.md @@ -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) @@ -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