Method: ActiveRecord::SchemaMigration#delete_version

Defined in:
activerecord/lib/active_record/schema_migration.rb

#delete_version(version) ⇒ Object



27
28
29
30
31
32
33
34
# File 'activerecord/lib/active_record/schema_migration.rb', line 27

def delete_version(version)
  dm = Arel::DeleteManager.new(arel_table)
  dm.wheres = [arel_table[primary_key].eq(version)]

  @pool.with_connection do |connection|
    connection.delete(dm, "#{self.class} Destroy")
  end
end