cmd/entfix: add utility binary entfix (#4306)

* cmd/entfix: add utility binary entfix

First command is 'entfix globalid' which will convert an existing ent_types table to the globalid ent feature.

* CR
This commit is contained in:
Jannik Clausen
2025-01-20 15:07:31 +01:00
committed by GitHub
parent f7fed7316b
commit 4478d3ccb3
5 changed files with 295 additions and 1 deletions

View File

@@ -120,7 +120,7 @@ func (a *Atlas) NamedDiff(ctx context.Context, name string, tables ...*Table) er
if a.dir == nil {
return errors.New("no migration directory given")
}
opts := []migrate.PlannerOption{migrate.WithFormatter(a.fmt)}
opts := []migrate.PlannerOption{migrate.PlanFormat(a.fmt)}
// Validate the migration directory before proceeding.
if err := migrate.Validate(a.dir); err != nil {
return fmt.Errorf("validating migration directory: %w", err)