mirror of
https://github.com/ent/ent.git
synced 2026-05-22 09:31:45 +03:00
examples/migration: add doc about migration linting (#2856)
This commit is contained in:
@@ -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
|
||||
```
|
||||
|
||||
@@ -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=
|
||||
|
||||
Reference in New Issue
Block a user