We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
AllCops: MigratedSchemaVersion
1 parent 11321b8 commit 2caf790Copy full SHA for 2caf790
lib/rubocop/rails/migration_file_skippable.rb
@@ -38,7 +38,7 @@ def self.apply_to_cops!
38
def already_migrated_file?
39
return false unless migrated_schema_version
40
41
- match_data = File.basename(processed_source.file_path).match(/(?<timestamp>\d{14})/)
+ match_data = File.basename(processed_source.file_path).match(%r|migrate/*/*(?<timestamp>\d{14})|)
42
schema_version = match_data['timestamp'] if match_data
43
44
return false unless schema_version
0 commit comments