@@ -836,13 +836,11 @@ defmodule AshPostgres.MigrationGenerator do
836836
837837defp after? (
838838% Operation.AddUniqueIndex {
839- identity: % { keys: keys } ,
840- table: table ,
841- multitenancy: multitenancy
839+ table: table
842840} ,
843- % Operation.AddAttribute { table: table , attribute: % { name: name } }
841+ % { table: table }
844842) do
845- name in keys || ( multitenancy . attribute && name == multitenancy . attribute )
843+ true
846844end
847845
848846defp after? (
@@ -857,28 +855,11 @@ defmodule AshPostgres.MigrationGenerator do
857855( multitenancy . attribute && multitenancy . attribute in List . wrap ( attribute_or_attributes ) )
858856end
859857
860- defp after? ( % Operation.AddUniqueIndex { table: table } , % Operation.RemoveUniqueIndex { table: table } ) ,
861- do: true
862-
863858defp after? ( % Operation.AddCheckConstraint { table: table } , % Operation.RemoveCheckConstraint {
864859table: table
865860} ) ,
866861do: true
867862
868- defp after? (
869- % Operation.AddUniqueIndex { identity: % { keys: keys } , table: table } ,
870- % Operation.AlterAttribute { table: table , new_attribute: % { name: name } }
871- ) do
872- name in keys
873- end
874-
875- defp after? (
876- % Operation.AddUniqueIndex { identity: % { keys: keys } , table: table } ,
877- % Operation.RenameAttribute { table: table , new_attribute: % { name: name } }
878- ) do
879- name in keys
880- end
881-
882863defp after? (
883864% Operation.AddCheckConstraint {
884865constraint: % { attribute: attribute_or_attributes } ,
@@ -900,17 +881,17 @@ defmodule AshPostgres.MigrationGenerator do
900881end
901882
902883defp after? (
903- % Operation.RemoveUniqueIndex { identity: % { keys: keys } , table: table } ,
904- % Operation.RemoveAttribute { table: table , attribute: % { name: name } }
884+ % Operation.RemoveUniqueIndex { table: table } ,
885+ % Operation.AddUniqueIndex { table: table }
905886) do
906- name in keys
887+ false
907888end
908889
909890defp after? (
910- % Operation.RemoveUniqueIndex { identity: % { keys: keys } , table: table } ,
911- % Operation.RenameAttribute { table: table , old_attribute: % { name: name } }
891+ % Operation.RemoveUniqueIndex { table: table } ,
892+ % { table: table }
912893) do
913- name in keys
894+ true
914895end
915896
916897defp after? (
@@ -1011,10 +992,6 @@ defmodule AshPostgres.MigrationGenerator do
1011992) ,
1012993do: true
1013994
1014- defp after? ( % Operation.AddUniqueIndex { table: table } , % Operation.CreateTable { table: table } ) do
1015- true
1016- end
1017-
1018995defp after? ( % Operation.AddCheckConstraint { table: table } , % Operation.CreateTable { table: table } ) do
1019996true
1020997end