Skip to content

Commit e35095a

Browse files
authored
Merge pull request #50 from andyatkinson/chore/more-regexp-warning-fixes
Additional warnings fixes
2 parents 78a435c + c5f0096 commit e35095a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/activerecord-clean-db-structure/clean_dump.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def run
8080
partitioned_tables += dump.scan(partitioned_tables_regexp1).map(&:last)
8181

8282
# Earlier versions use an inline PARTITION OF
83-
partitioned_tables_regexp2 = /-- Name: ([\w_\.]+); Type: TABLE\n\n[^;]+?PARTITION OF [\w_\.]+\n[^;]+?;/m
83+
partitioned_tables_regexp2 = /-- Name: ([\w\.]+); Type: TABLE\n\n[^;]+?PARTITION OF [\w\.]+\n[^;]+?;/m
8484
partitioned_tables += dump.scan(partitioned_tables_regexp2).map(&:first)
8585

8686
partitioned_tables.each do |partitioned_table|
@@ -104,7 +104,7 @@ def run
104104
dump.gsub!(/-- Name: #{partitioned_table}_pkey; Type: INDEX ATTACH\n\n[^;]+?ATTACH PARTITION ([\w_]+\.)?#{partitioned_table}_pkey;/, '')
105105
end
106106
# This is mostly done to allow restoring Postgres 11 output on Postgres 10
107-
dump.gsub!(/CREATE INDEX ([\w_]+) ON ONLY/, 'CREATE INDEX \\1 ON')
107+
dump.gsub!(/CREATE INDEX ([\w]+) ON ONLY/, 'CREATE INDEX \\1 ON')
108108

109109
if options[:order_schema_migrations_values] == true
110110
schema_migrations_cleanup

0 commit comments

Comments
 (0)