mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
454 B
454 B
Versioned Migration Example
The full reference example for https://entgo.io/docs/versioned-migrations#create-a-migration-files-generator.
Migration directory
Versioned migration files exists under ent/migrate/migrations and follows the golang-migrate format.
Changes to the Ent schema
1. Change the ent/schema.
2. Run go generate ./ent
Generate new versioned migration
go run -mod=mod ent/migrate/main.go <name>