examples/migration: add doc about migration linting (#2856)

This commit is contained in:
Ariel Mashraki
2022-08-15 09:45:36 +03:00
committed by GitHub
parent 94226c9093
commit 6637cbf68e
9 changed files with 103 additions and 12 deletions

View File

@@ -17,4 +17,14 @@ Versioned migration files exists under `ent/migrate/migrations` and follows the
```go
go run -mod=mod ent/migrate/main.go <name>
```
```
### Run linting
```bash
go run -mod=mod ariga.io/atlas/cmd/atlas@master migrate lint \
--dev-url="mysql://root:pass@localhost:3306/test" \
--dir="file://ent/migrate/migrations" \
--dir-format="golang-migrate" \
--latest=1
```

View File

@@ -1,3 +1,2 @@
h1:5L8DOvq2+kBvCJnas+3aFRz+Q9Y2a56ws1iWij8DqjM=
20220814104819_create_users.down.sql h1:5je7ToUCSDfz5WwtrvMLTk1F9EesaxDG8MnCD1brTAc=
20220814104819_create_users.up.sql h1:gMhHFCB8ev5g4DyQLjEt5PJPp5yToj4g5207iPl2N0w=
h1:xTs5+xjXcSCUFE4LOrZmcfnsCRBRHF7GoSEg5aC6lYc=
20220814190333_create_users.up.sql h1:kqsTUgWM7DTjW8gn/tMCgtmlxVf2hEwUTEU6FHcM5mY=