File tree 4 files changed +27
-16
lines changed
lib/activerecord-clean-db-structure
4 files changed +27
-16
lines changed Original file line number Diff line number Diff line change 1
1
pkg
2
+ /.idea
Original file line number Diff line number Diff line change 1
1
PATH
2
2
remote: .
3
3
specs:
4
- activerecord-clean-db-structure (0.2.0 )
4
+ activerecord-clean-db-structure (0.2.1 )
5
5
activerecord (>= 4.2 )
6
6
7
7
GEM
8
8
remote: https://rubygems.org/
9
9
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 )
17
17
concurrent-ruby (~> 1.0 , >= 1.0.2 )
18
18
i18n (~> 0.7 )
19
19
minitest (~> 5.1 )
20
20
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 )
27
27
thread_safe (~> 0.1 )
28
28
29
29
PLATFORMS
@@ -33,4 +33,4 @@ DEPENDENCIES
33
33
activerecord-clean-db-structure !
34
34
35
35
BUNDLED 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
27
27
# Remove useless comment lines
28
28
dump . gsub! ( /^--$/ , '' )
29
29
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
+
30
40
# Reduce noise for id fields by making them SERIAL instead of integer+sequence stuff
31
41
#
32
42
# 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 1
1
module ActiveRecordCleanDbStructure
2
- VERSION = '0.2.0 '
2
+ VERSION = '0.2.1 '
3
3
end
You can’t perform that action at this time.
0 commit comments