activerecord-clean-db-structure 0.2.4 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/Gemfile.lock +11 -10
- data/lib/activerecord-clean-db-structure/clean_dump.rb +6 -0
- data/lib/activerecord-clean-db-structure/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 10dea719bd9d1f2c4fba1129d5144b80f70aff09
|
|
4
|
+
data.tar.gz: 90d2c2073efc8e115e224628348d329331177e35
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9015f92b1b1e619e91ad64fee4963805daf4c241014add49423b0637adcfa2e0ff662c208d44f19441be9ef6f644424a47efd91cc2c62030ff73d52a8dfeaeee
|
|
7
|
+
data.tar.gz: f47aba5110e6a6f9e072f43e16077a1167a92b820a7cb287a6cc77e7d4dd82ff8493d1e61af312a6128a9a85d19c0828b6b2d4f6733e355ae5ca0e8848eacab9
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,30 +1,31 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
activerecord-clean-db-structure (0.2.
|
|
4
|
+
activerecord-clean-db-structure (0.2.5)
|
|
5
5
|
activerecord (>= 4.2)
|
|
6
6
|
|
|
7
7
|
GEM
|
|
8
8
|
remote: https://rubygems.org/
|
|
9
9
|
specs:
|
|
10
|
-
activemodel (5.1.
|
|
11
|
-
activesupport (= 5.1.
|
|
12
|
-
activerecord (5.1.
|
|
13
|
-
activemodel (= 5.1.
|
|
14
|
-
activesupport (= 5.1.
|
|
10
|
+
activemodel (5.1.4)
|
|
11
|
+
activesupport (= 5.1.4)
|
|
12
|
+
activerecord (5.1.4)
|
|
13
|
+
activemodel (= 5.1.4)
|
|
14
|
+
activesupport (= 5.1.4)
|
|
15
15
|
arel (~> 8.0)
|
|
16
|
-
activesupport (5.1.
|
|
16
|
+
activesupport (5.1.4)
|
|
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
21
|
arel (8.0.0)
|
|
22
22
|
concurrent-ruby (1.0.5)
|
|
23
|
-
i18n (0.
|
|
23
|
+
i18n (0.9.1)
|
|
24
|
+
concurrent-ruby (~> 1.0)
|
|
24
25
|
minitest (5.10.3)
|
|
25
26
|
rake (0.9.6)
|
|
26
27
|
thread_safe (0.3.6)
|
|
27
|
-
tzinfo (1.2.
|
|
28
|
+
tzinfo (1.2.4)
|
|
28
29
|
thread_safe (~> 0.1)
|
|
29
30
|
|
|
30
31
|
PLATFORMS
|
|
@@ -35,4 +36,4 @@ DEPENDENCIES
|
|
|
35
36
|
rake (~> 0)
|
|
36
37
|
|
|
37
38
|
BUNDLED WITH
|
|
38
|
-
1.
|
|
39
|
+
1.16.0
|
|
@@ -54,6 +54,12 @@ module ActiveRecordCleanDbStructure
|
|
|
54
54
|
dump.gsub!(inherited_tables_regexp, '')
|
|
55
55
|
inherited_tables.each do |inherited_table|
|
|
56
56
|
dump.gsub!(/ALTER TABLE ONLY #{inherited_table}[^;]+;/, '')
|
|
57
|
+
|
|
58
|
+
index_regexp = /CREATE INDEX ([\w_]+) ON #{inherited_table}[^;]+;/m
|
|
59
|
+
dump.scan(index_regexp).map(&:first).each do |inherited_table_index|
|
|
60
|
+
dump.gsub!("-- Name: #{inherited_table_index}; Type: INDEX", '')
|
|
61
|
+
end
|
|
62
|
+
dump.gsub!(index_regexp, '')
|
|
57
63
|
end
|
|
58
64
|
|
|
59
65
|
# Remove whitespace between schema migration INSERTS to make editing easier
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: activerecord-clean-db-structure
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Lukas Fittl
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-11-
|
|
11
|
+
date: 2017-11-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activerecord
|
|
@@ -77,7 +77,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
77
77
|
version: '0'
|
|
78
78
|
requirements: []
|
|
79
79
|
rubyforge_project:
|
|
80
|
-
rubygems_version: 2.6.
|
|
80
|
+
rubygems_version: 2.6.13
|
|
81
81
|
signing_key:
|
|
82
82
|
specification_version: 4
|
|
83
83
|
summary: Automatic cleanup for the Rails db/structure.sql file (ActiveRecord/PostgreSQL)
|