diff --git a/cmd/atlas/internal/cmdapi/migrate.go b/cmd/atlas/internal/cmdapi/migrate.go index 269fac17fe4..baf43d10a1a 100644 --- a/cmd/atlas/internal/cmdapi/migrate.go +++ b/cmd/atlas/internal/cmdapi/migrate.go @@ -700,10 +700,19 @@ func migrateDiffRun(cmd *cobra.Command, args []string, flags migrateDiffFlags, e migrate.PlanWithIndent(indent), migrate.PlanWithDiffOptions(env.DiffOptions()...), } + if dev.URL.Schema != "" { // Disable tables qualifier in schema-mode. - opts = append(opts, migrate.PlanWithSchemaQualifier(flags.qualifier)) + opts = append(opts, + migrate.PlanWithSchemaQualifier(""), + migrate.PlanWithDiffOptions(schema.DiffSkipChanges( + &schema.AddSchema{}, + &schema.DropSchema{}, + &schema.ModifySchema{}, + )), + ) } + // Plan the changes and create a new migration file. pl := migrate.NewPlanner(dev.Driver, dir, opts...) plan, err := func() (*migrate.Plan, error) {