lib/pg_trunk/operations/foreign_keys/base.rb
# Add a name of the existing foreign key
Add a name of the existing foreign key
Add a name of the existing foreign key
def current_name
      @current_name ||= AddForeignKey.find do |fk|
        fk.table == table &&
          fk.columns == columns &&
          fk.reference == reference &&
          fk.primary_key == primary_key
      end&.name
    end
def current_name @current_name ||= AddForeignKey . find do | fk | fk . table == table && fk . columns == columns && fk . reference == reference && fk . primary_key == primary_key end &. name end
Add a name of the existing foreign key
Add a name of the existing foreign key