File tree Expand file tree Collapse file tree 4 files changed +27
-16
lines changed
lib/activerecord-clean-db-structure Expand file tree Collapse file tree 4 files changed +27
-16
lines changed Original file line number Diff line number Diff line change 11pkg
2+ /.idea
Original file line number Diff line number Diff line change 11PATH
22 remote: .
33 specs:
4- activerecord-clean-db-structure (0.2.0 )
4+ activerecord-clean-db-structure (0.2.1 )
55 activerecord (>= 4.2 )
66
77GEM
88 remote: https://rubygems.org/
99 specs:
10- activemodel (5.0.1 )
11- activesupport (= 5.0.1 )
12- activerecord (5.0.1 )
13- activemodel (= 5.0.1 )
14- activesupport (= 5.0.1 )
15- arel (~> 7 .0 )
16- activesupport (5.0.1 )
10+ activemodel (5.1.2 )
11+ activesupport (= 5.1.2 )
12+ activerecord (5.1.2 )
13+ activemodel (= 5.1.2 )
14+ activesupport (= 5.1.2 )
15+ arel (~> 8 .0 )
16+ activesupport (5.1.2 )
1717 concurrent-ruby (~> 1.0 , >= 1.0.2 )
1818 i18n (~> 0.7 )
1919 minitest (~> 5.1 )
2020 tzinfo (~> 1.1 )
21- arel (7.1.4 )
22- concurrent-ruby (1.0.4 )
23- i18n (0.8.0 )
24- minitest (5.10.1 )
25- thread_safe (0.3.5 )
26- tzinfo (1.2.2 )
21+ arel (8.0.0 )
22+ concurrent-ruby (1.0.5 )
23+ i18n (0.8.4 )
24+ minitest (5.10.2 )
25+ thread_safe (0.3.6 )
26+ tzinfo (1.2.3 )
2727 thread_safe (~> 0.1 )
2828
2929PLATFORMS
@@ -33,4 +33,4 @@ DEPENDENCIES
3333 activerecord-clean-db-structure !
3434
3535BUNDLED WITH
36- 1.12.5
36+ 1.15.1
Original file line number Diff line number Diff line change @@ -27,6 +27,16 @@ def run
2727 # Remove useless comment lines
2828 dump . gsub! ( /^--$/ , '' )
2929
30+ # Mask user mapping
31+ dump . gsub! (
32+ /^CREATE USER MAPPING FOR \w + SERVER (\w +) .*;/m ,
33+ 'CREATE USER MAPPING FOR some_user SERVER \1;'
34+ )
35+ dump . gsub! (
36+ /^-- Name: USER MAPPING \w + SERVER (\w +); Type: USER MAPPING/ ,
37+ '-- Name: USER MAPPING some_user SERVER \1; Type: USER MAPPING'
38+ )
39+
3040 # Reduce noise for id fields by making them SERIAL instead of integer+sequence stuff
3141 #
3242 # This is a bit optimistic, but works as long as you don't have an id field thats not a sequence/uuid
Original file line number Diff line number Diff line change 11module ActiveRecordCleanDbStructure
2- VERSION = '0.2.0 '
2+ VERSION = '0.2.1 '
33end
You can’t perform that action at this time.
0 commit comments