percona_migrator 1.1.0 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -1
- data/lib/active_record/connection_adapters/percona_adapter.rb +7 -3
- data/lib/lhm/column_with_sql.rb +2 -0
- data/lib/percona_migrator/version.rb +1 -1
- data/percona_migrator.gemspec +2 -2
- metadata +7 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 85670107817ca34d6d035aca1ea0309abae91c0e
|
4
|
+
data.tar.gz: 6560cd3f9d4ce05f3a9937de5b2d10d241b698a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a1b79e7572054086b27fdbc3e904c260d76356a097ffdc51f2689ce4bfd98da23df28fb17dbb4bcd115ac75c637fcf32d8692ea3a1d5ff6386c23f127a815ea
|
7
|
+
data.tar.gz: 556807462ad46a9b19b9d815a19d8d5d0fa463b4397373f834a64ea2bc0861d3cb1fa64554cb85353784518e914fa097624c1ee61693d4a3b7d47ccfd6864af0
|
data/CHANGELOG.md
CHANGED
@@ -5,10 +5,12 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
5
5
|
Please follow the format in [Keep a Changelog](http://keepachangelog.com/)
|
6
6
|
|
7
7
|
## [Unreleased]
|
8
|
-
## [
|
8
|
+
## [3.0.0] - 2016-04-07
|
9
9
|
|
10
10
|
### Added
|
11
11
|
|
12
|
+
- Support for ActiveRecord 4.2.x
|
13
|
+
- Support for Mysql2 4.x
|
12
14
|
- Allow passing any `pt-online-schema-change`'s arguments through the
|
13
15
|
`PERCONA_ARGS` env var when executing a migration with `rake db:migrate:up`
|
14
16
|
or `db:migrate:down`.
|
@@ -55,7 +55,7 @@ module ActiveRecord
|
|
55
55
|
|
56
56
|
def initialize(connection, _logger, connection_options, _config)
|
57
57
|
super
|
58
|
-
@
|
58
|
+
@prepared_statements = false
|
59
59
|
@mysql_adapter = connection_options[:mysql_adapter]
|
60
60
|
end
|
61
61
|
|
@@ -91,8 +91,8 @@ module ActiveRecord
|
|
91
91
|
true
|
92
92
|
end
|
93
93
|
|
94
|
-
def new_column(field, default,
|
95
|
-
Column.new(field, default,
|
94
|
+
def new_column(field, default, cast_type, sql_type = nil, null = true, collation = '', extra = '')
|
95
|
+
Column.new(field, default, cast_type, sql_type, null, collation, strict_mode?, extra)
|
96
96
|
end
|
97
97
|
|
98
98
|
# Adds a new index to the table
|
@@ -119,6 +119,10 @@ module ActiveRecord
|
|
119
119
|
def error_number(_exception)
|
120
120
|
end
|
121
121
|
|
122
|
+
def full_version
|
123
|
+
mysql_adapter.raw_connection.server_info[:version]
|
124
|
+
end
|
125
|
+
|
122
126
|
private
|
123
127
|
|
124
128
|
attr_reader :mysql_adapter
|
data/lib/lhm/column_with_sql.rb
CHANGED
@@ -53,9 +53,11 @@ module Lhm
|
|
53
53
|
#
|
54
54
|
# @return [column_factory]
|
55
55
|
def column
|
56
|
+
cast_type = ActiveRecord::Base.connection.lookup_cast_type(definition)
|
56
57
|
@column ||= self.class.column_factory.new(
|
57
58
|
name,
|
58
59
|
default_value,
|
60
|
+
cast_type,
|
59
61
|
definition,
|
60
62
|
null_value
|
61
63
|
)
|
data/percona_migrator.gemspec
CHANGED
@@ -24,8 +24,8 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
25
25
|
spec.require_paths = ['lib']
|
26
26
|
|
27
|
-
spec.add_runtime_dependency 'rails', '
|
28
|
-
spec.add_runtime_dependency 'mysql2', '0.
|
27
|
+
spec.add_runtime_dependency 'rails', '~> 4.2.0'
|
28
|
+
spec.add_runtime_dependency 'mysql2', '~> 0.4.0'
|
29
29
|
|
30
30
|
spec.add_development_dependency 'bundler', '~> 1.10'
|
31
31
|
spec.add_development_dependency 'rake', '~> 10.0'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: percona_migrator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ilya Zayats
|
@@ -18,36 +18,30 @@ dependencies:
|
|
18
18
|
name: rails
|
19
19
|
requirement: !ruby/object:Gem::Requirement
|
20
20
|
requirements:
|
21
|
-
- - ">="
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version: 3.2.22
|
24
21
|
- - "~>"
|
25
22
|
- !ruby/object:Gem::Version
|
26
|
-
version: 4.
|
23
|
+
version: 4.2.0
|
27
24
|
type: :runtime
|
28
25
|
prerelease: false
|
29
26
|
version_requirements: !ruby/object:Gem::Requirement
|
30
27
|
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: 3.2.22
|
34
28
|
- - "~>"
|
35
29
|
- !ruby/object:Gem::Version
|
36
|
-
version: 4.
|
30
|
+
version: 4.2.0
|
37
31
|
- !ruby/object:Gem::Dependency
|
38
32
|
name: mysql2
|
39
33
|
requirement: !ruby/object:Gem::Requirement
|
40
34
|
requirements:
|
41
|
-
- -
|
35
|
+
- - "~>"
|
42
36
|
- !ruby/object:Gem::Version
|
43
|
-
version: 0.
|
37
|
+
version: 0.4.0
|
44
38
|
type: :runtime
|
45
39
|
prerelease: false
|
46
40
|
version_requirements: !ruby/object:Gem::Requirement
|
47
41
|
requirements:
|
48
|
-
- -
|
42
|
+
- - "~>"
|
49
43
|
- !ruby/object:Gem::Version
|
50
|
-
version: 0.
|
44
|
+
version: 0.4.0
|
51
45
|
- !ruby/object:Gem::Dependency
|
52
46
|
name: bundler
|
53
47
|
requirement: !ruby/object:Gem::Requirement
|