active_record_shards 3.4.2 → 3.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/active_record_shards/tasks.rb +6 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 560297ec2853470b0022c84d8dd57c15a40589cf
|
4
|
+
data.tar.gz: fd7b67c7d15b63d24d1c7f8d2cbebcaeaf5c7816
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 498854a4c1bcf28b74b9af9317c69d925bcc4aa1a3d00bec5ade25978e7203ed952c0a46ee402918160bb317a2c22ae5e40e1c1c3b47b6ac58823d8bc7892324
|
7
|
+
data.tar.gz: 43e2d7bd3a71a22941405370b6544b112e0cc0ea750912599a74c37338e802425dd81a654133330211171db88de3b79e0be71bf64ca8112c800dafdb1c69d7bb
|
@@ -29,7 +29,12 @@ namespace :db do
|
|
29
29
|
if key.starts_with?(ActiveRecordShards.rails_env) && !key.ends_with?("_slave")
|
30
30
|
if ActiveRecord::VERSION::MAJOR >= 4
|
31
31
|
begin
|
32
|
-
|
32
|
+
# MysqlAdapter takes charset instead of encoding in Rails 4
|
33
|
+
# https://github.com/rails/rails/commit/78b30fed9336336694fb2cb5d2825f95800b541c
|
34
|
+
symbolized_configuration = conf.symbolize_keys
|
35
|
+
symbolized_configuration[:charset] = symbolized_configuration[:encoding]
|
36
|
+
|
37
|
+
ActiveRecordShards::Tasks.root_connection(conf).create_database(conf['database'], symbolized_configuration)
|
33
38
|
rescue ActiveRecord::StatementInvalid => ex
|
34
39
|
if ex.message.include?('database exists')
|
35
40
|
puts "#{conf['database']} already exists"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_record_shards
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.4.
|
4
|
+
version: 3.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mick Staugaard
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2015-
|
13
|
+
date: 2015-04-29 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activerecord
|