module RuboCop::Rails::MigrationFileSkippable

def already_migrated_file?

def already_migrated_file?
  return false unless migrated_schema_version
  match_data = File.basename(processed_source.file_path).match(/(?<timestamp>\d{14})/)
  schema_version = match_data['timestamp'] if match_data
  return false unless schema_version
  schema_version <= migrated_schema_version.to_s # Ignore applied migration files.
end