temporal_tables 1.0.2 → 1.0.3

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: 7482588a765da3aeea2a1a5d7f32fdc000ee7f4c46b1affc2d9084822dd92313
4
- data.tar.gz: 18eab05d32391261c5bf39bc4ddac2b91a177550d30100da2e270530f7bee8f4
3
+ metadata.gz: cf7a65a415b9c610e9ea05fd20ddbe8466dd37279f65bf62d4d499cab1d5527f
4
+ data.tar.gz: 803d774d51c82624c33b4fd732d2f2b9c6f16fe288725aca6ced174f7e35071e
5
5
  SHA512:
6
- metadata.gz: 25a32d75519abc56c1dcd1debb1313ffefe964d1f514b82a8ad3919af84d5072418c87d0e580668f48617e41e2ed4bb33b28edd8ae2537315a0428b85a694cf2
7
- data.tar.gz: 88b6b7f2db88810911f52c37faf86412ef9f315a6d664c2785a89c486cd4a38564a8d3b0849137ea796f5fc823788b2dc5b4c5b20629593b06d380452df5ab46
6
+ metadata.gz: 7d3599da77f429b650b262128841864d774ec3be87dc5393702146f06d2fb5acc2ff8fd0c146e02cc328eb563b07f1d3a9638551dcc3a63d25ccbedc29d48e53
7
+ data.tar.gz: 6ce73a4fac38c371fe1d663e1970ee09e824b1e476872e5e7cf49c3b488ea9811efae0754798f8b39b60e340d14b9944fdeb8ed27fc4f20fb19386b4170f9ffb
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- temporal_tables (1.0.2)
4
+ temporal_tables (1.0.3)
5
5
  rails (>= 6.0, < 7.1)
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- temporal_tables (1.0.2)
4
+ temporal_tables (1.0.3)
5
5
  rails (>= 6.0, < 7.1)
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- temporal_tables (1.0.2)
4
+ temporal_tables (1.0.3)
5
5
  rails (>= 6.0, < 7.1)
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- temporal_tables (1.0.2)
4
+ temporal_tables (1.0.3)
5
5
  rails (>= 6.0, < 7.1)
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- temporal_tables (1.0.2)
4
+ temporal_tables (1.0.3)
5
5
  rails (>= 6.0, < 7.1)
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- temporal_tables (1.0.2)
4
+ temporal_tables (1.0.3)
5
5
  rails (>= 6.0, < 7.1)
6
6
 
7
7
  GEM
@@ -133,11 +133,12 @@ module TemporalTables
133
133
  end
134
134
 
135
135
  def remove_index(table_name, column_name = nil, **options)
136
+ original_index_name = index_name_for_remove(table_name, column_name, options)
136
137
  super(table_name, column_name, **options)
137
138
 
138
139
  return unless table_exists?(temporal_name(table_name))
139
140
 
140
- idx_name = temporal_index_name(options[:name] || index_name_for_remove(table_name, column_name, options))
141
+ idx_name = temporal_index_name(options[:name] || original_index_name)
141
142
  super temporal_name(table_name), column_name, name: idx_name
142
143
  end
143
144
 
@@ -136,11 +136,12 @@ module TemporalTables
136
136
  end
137
137
 
138
138
  def remove_index(table_name, options = {})
139
+ original_index_name = index_name_for_remove(table_name, options)
139
140
  super(table_name, options)
140
141
 
141
142
  return unless table_exists?(temporal_name(table_name))
142
143
 
143
- idx_name = temporal_index_name(index_name_for_remove(table_name, options))
144
+ idx_name = temporal_index_name(original_index_name)
144
145
  super temporal_name(table_name), name: idx_name
145
146
  end
146
147
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TemporalTables
4
- VERSION = '1.0.2'
4
+ VERSION = '1.0.3'
5
5
  end
@@ -30,6 +30,8 @@ ActiveRecord::Schema.define do
30
30
  t.string :type
31
31
  t.string :model
32
32
  end
33
+ add_index :flying_machines, :model, unique: true
34
+ remove_index :flying_machines, :model
33
35
 
34
36
  create_table :cats, id: (postgres ? :uuid : :integer), temporal: true, force: true do |t|
35
37
  t.string :name
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: temporal_tables
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brent Kroeker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-27 00:00:00.000000000 Z
11
+ date: 2022-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails