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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: df19cbdeb9b3e36074ff5e95ec745afafb5db5f6
4
- data.tar.gz: df627f8393513e5699c63d37c84e46237596aea4
3
+ metadata.gz: 85670107817ca34d6d035aca1ea0309abae91c0e
4
+ data.tar.gz: 6560cd3f9d4ce05f3a9937de5b2d10d241b698a9
5
5
  SHA512:
6
- metadata.gz: 6a37c51ca128523a8ab16f9271a76e0612355ccba8e9406557634ccaf77d4e62db25fa29ccc9edf0fc5e7ebf952a6bb7074e870f7fa545c5714b5235212e6d51
7
- data.tar.gz: 80a4e55d6136515ee6f742b9053a7dca9d1e11570bdc29d1f1b662e135f210bb88e54d6a09dceb9b3b88d4fee4056464e527dce22dadf6fd10d665b6d698586c
6
+ metadata.gz: 8a1b79e7572054086b27fdbc3e904c260d76356a097ffdc51f2689ce4bfd98da23df28fb17dbb4bcd115ac75c637fcf32d8692ea3a1d5ff6386c23f127a815ea
7
+ data.tar.gz: 556807462ad46a9b19b9d815a19d8d5d0fa463b4397373f834a64ea2bc0861d3cb1fa64554cb85353784518e914fa097624c1ee61693d4a3b7d47ccfd6864af0
@@ -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
- ## [1.1.0] - 2017-04-07
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
- @visitor = BindSubstitution.new(self)
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, type, null, collation, extra = "")
95
- Column.new(field, default, type, null, collation, extra)
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
@@ -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
  )
@@ -1,3 +1,3 @@
1
1
  module PerconaMigrator
2
- VERSION = '1.1.0'.freeze
2
+ VERSION = '3.0.0'.freeze
3
3
  end
@@ -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', '>= 3.2.22', '~> 4.0.0'
28
- spec.add_runtime_dependency 'mysql2', '0.3.20'
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: 1.1.0
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.0.0
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.0.0
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.3.20
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.3.20
44
+ version: 0.4.0
51
45
  - !ruby/object:Gem::Dependency
52
46
  name: bundler
53
47
  requirement: !ruby/object:Gem::Requirement