db-purger 0.2.7 → 0.2.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 467c140ae632db0d6ef023e6831cdd7b3cfef60681e568cab979d7c501df149d
4
- data.tar.gz: 91b3f4eb1529b7d96c39df1943604e9c251e20e0e1ca27e24035563ebc2a41c0
3
+ metadata.gz: 34116fee0d9eeaf6088a0540de4a0beeee799132ed602565fa1cacbd30ccfa74
4
+ data.tar.gz: e409a353b7c8fee4e0388df8679ed8f0e0d349eb65886ce9c8a7b1a585009678
5
5
  SHA512:
6
- metadata.gz: 27115aec9e8156c358f0b310b373ff509dd327139f7732fd3548767abae7ce39f4e0f59bf02b3a27a701189b022c2a7b459166f9aa22311d8235a76cb6695bd3
7
- data.tar.gz: c6efa22b397166e06ad464c73844fcca14542ce358a0ea3bd87be1d2fa130600ebfe62b56da416c416d3ba0aacd48a5f4ef0441fb90b5d3747881e6d0ccff451
6
+ metadata.gz: 94cd8d307f78a4ba079f45c4af64db3c89a2272ca0d33d1a12af77945a8b3aa46719ba4547f7f7d458ac234c9a5f3d187f903b2ac2650585285978a7caddceb0
7
+ data.tar.gz: 27b56ef6cf8e1aefe615a44c3433d6835356bda2f234335a20e85b1e6fa296318562ca8053f053a2bf3f068f77bcd6895dc52fa46f18b744b32e7f5d1ae27b2f
@@ -19,9 +19,9 @@ module DBPurger
19
19
  line_break
20
20
  model = find_model_for_table(base_table_name)
21
21
  foreign_key = foreign_key_name(model)
22
- add_parent_tables(base_table_name, foreign_key)
22
+ add_parent_tables(base_table_name, field) unless field == :id
23
23
  unless (child_models = find_child_models(model, foreign_key)).empty?
24
- line_break
24
+ line_break unless field == :id
25
25
  add_child_tables(child_models, foreign_key, 0)
26
26
  end
27
27
  ignore_missing_tables
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: db-purger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.7
4
+ version: 0.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Doug Youch
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-07-23 00:00:00.000000000 Z
11
+ date: 2019-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dynamic-active-model