declare_schema 1.2.3.pre.ga.5 → 1.2.3.pre.ga.6

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: aacc7a857e82fc857a7694a7c32afe7b9bee2a8949dd455f6506eac066658353
4
- data.tar.gz: 513a4171b54d053b3e9cc58111256010040634e287cf2d7f1a33b278cad92548
3
+ metadata.gz: '0681126cdd17705ec35f41ab9e4dc608fbc961b50614124ace54e17c49675eca'
4
+ data.tar.gz: efa69b2eb51fa5e2a9ec5b22ed04ecdf91679abecfb674646ea7e461974a097e
5
5
  SHA512:
6
- metadata.gz: b5075ebac4ebd80def763e46df74d506e3c2df43d4c0601e35fe335be7c3db8faf5b280fd4417dc54ff2f6608162de5ba69082af4353df6f3d7b0ff449b20486
7
- data.tar.gz: 48534ddd177e9061390b26db9142842968cf28f2637f1cc7d091e28205ace5d55c0ddb0669c7b31b370d4d27d18e83ecc09d0c4b8451f79c4230ef0667c89d4f
6
+ metadata.gz: 69d913a279f29f6368ceb224791213d9bc711e27c8a4a598f7feeb720bf753c5b6e5d65e7537655979b9bc6da5ee663c69f8c9dc2a8e2156b5b1e1c7608cc03b
7
+ data.tar.gz: 5f4b21eb05fc804a883f5bef692bf3473e25b8a61e066cf094e363b46be27fede8fc520efebc04a49ccd4e3c56fa7bddfcb5713204c828dba146904423781535
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- declare_schema (1.2.3.pre.ga.5)
4
+ declare_schema (1.2.3.pre.ga.6)
5
5
  rails (>= 5.0)
6
6
 
7
7
  GEM
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DeclareSchema
4
- VERSION = "1.2.3.pre.ga.5"
4
+ VERSION = "1.2.3.pre.ga.6"
5
5
  end
@@ -469,7 +469,7 @@ module Generators
469
469
  end
470
470
 
471
471
  def index_changes_due_to_column_renames(indexes_to_drop, indexes_to_add, to_rename)
472
- indexes_to_drop.each_with_object([], []) do |index_to_drop, (renamed_indexes_to_drop, renamed_indexes_to_add)|
472
+ indexes_to_drop.each_with_object([[], []]) do |index_to_drop, (renamed_indexes_to_drop, renamed_indexes_to_add)|
473
473
  renamed_columns = index_to_drop.columns.map do |column|
474
474
  to_rename.fetch(column, column)
475
475
  end.sort
@@ -508,16 +508,15 @@ module Generators
508
508
  end
509
509
 
510
510
  def foreign_key_changes_due_to_column_renames(fks_to_drop, fks_to_add, to_rename)
511
- fks_to_drop.each_with_object([], []) do |fk_to_drop, (renamed_fks_to_drop, renamed_fks_to_add)|
512
- if (fks_to_add = fks_to_add.find do |fk_to_add|
511
+ fks_to_drop.each_with_object([[], []]) do |fk_to_drop, (renamed_fks_to_drop, renamed_fks_to_add)|
512
+ if (fk_to_add = fks_to_add.find do |fk_to_add|
513
513
  fk_to_add.foreign_key.nil? and raise "Foreign key is not allowed to be nil for #{fk_to_add.inspect}"
514
- if fk_to_add.child_table_name == fk_to_drop.child_table_name &&
515
- fk_to_add.parent_table_name == fk_to_drop.parent_table_name &&
516
- fk_to_add.foreign_key == to_rename[fk_to_drop.foreign_key]
517
- end
514
+ fk_to_add.child_table_name == fk_to_drop.child_table_name &&
515
+ fk_to_add.parent_table_name == fk_to_drop.parent_table_name &&
516
+ fk_to_add.foreign_key == to_rename[fk_to_drop.foreign_key]
518
517
  end)
519
518
  renamed_fks_to_drop << fk_to_drop
520
- renamed_fks_to_add << fks_to_add
519
+ renamed_fks_to_add << fk_to_add
521
520
  end
522
521
  end
523
522
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: declare_schema
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.3.pre.ga.5
4
+ version: 1.2.3.pre.ga.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Invoca Development adapted from hobo_fields by Tom Locke