switchman 1.8.1 → 1.8.2
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b82772037360a02f9f5767314b7f2a5619bb272a
|
4
|
+
data.tar.gz: b229555c12ad2f2af3527b5018d9a7c437eca543
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 43e22952d819b022f6a525e3be7a79acbe8b4e7edf215713833c72a59d12e9a50ae155f46f511295d5ab5177746f9593f8e5dfda729cf747993780a2ee362cfb
|
7
|
+
data.tar.gz: e6e23bca697932bd9ac28828ffe3fd1c4a3a38db691c68a7cc569a720d01729811a98029eca3f8a5339ebb3d821544a0a8f14b289d76b927c32398d0b1110555
|
@@ -0,0 +1,11 @@
|
|
1
|
+
class AddBackDefaultStringLimitsSwitchman < ActiveRecord::Migration
|
2
|
+
def up
|
3
|
+
add_string_limit_if_missing :switchman_shards, :name
|
4
|
+
add_string_limit_if_missing :switchman_shards, :database_server_id
|
5
|
+
end
|
6
|
+
|
7
|
+
def add_string_limit_if_missing(table, column)
|
8
|
+
return if column_exists?(table, column, :string, limit: 255)
|
9
|
+
change_column table, column, :string, limit: 255
|
10
|
+
end
|
11
|
+
end
|
@@ -52,9 +52,9 @@ module Switchman
|
|
52
52
|
relation = relation.where(table[primary_key].eq(conditions)) if conditions != :none
|
53
53
|
end
|
54
54
|
|
55
|
-
|
56
|
-
|
57
|
-
|
55
|
+
relation.activate do |shard_rel|
|
56
|
+
return true if connection.select_value(shard_rel, "#{name} Exists", shard_rel.bind_values)
|
57
|
+
end
|
58
58
|
false
|
59
59
|
end
|
60
60
|
end
|
data/lib/switchman/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: switchman
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.8.
|
4
|
+
version: 1.8.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cody Cutrer
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-
|
13
|
+
date: 2016-12-06 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: railties
|
@@ -190,6 +190,7 @@ files:
|
|
190
190
|
- app/models/switchman/shard_internal.rb
|
191
191
|
- db/migrate/20130328212039_create_switchman_shards.rb
|
192
192
|
- db/migrate/20130328224244_create_default_shard.rb
|
193
|
+
- db/migrate/20161206323434_add_back_default_string_limits_switchman.rb
|
193
194
|
- lib/switchman.rb
|
194
195
|
- lib/switchman/action_controller/caching.rb
|
195
196
|
- lib/switchman/active_record/abstract_adapter.rb
|
@@ -254,8 +255,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
254
255
|
version: '0'
|
255
256
|
requirements: []
|
256
257
|
rubyforge_project:
|
257
|
-
rubygems_version: 2.
|
258
|
+
rubygems_version: 2.6.7
|
258
259
|
signing_key:
|
259
260
|
specification_version: 4
|
260
261
|
summary: Rails 4 sharding magic
|
261
262
|
test_files: []
|
263
|
+
has_rdoc:
|