fix: properly order check constraints

This commit is contained in:
Zach Daniel 2022-07-22 00:50:19 -04:00
parent 968fb45b4e
commit 778641fb28

View file

@ -1002,10 +1002,13 @@ defmodule AshPostgres.MigrationGenerator do
end
defp after?(
%Operation.AddCheckConstraint{table: table, schema: schema},
%Operation.AddCheckConstraint{table: table, schema: schema, constraint: %{name: name}},
%Operation.RemoveCheckConstraint{
table: table,
schema: schema
schema: schema,
constraint: %{
name: name
}
}
),
do: true