percona_migrator 0.1.0.rc.1 → 0.1.0.rc.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 37474e0d339fdbbf66627f96d152780234101e1b
|
4
|
+
data.tar.gz: 399919fee87faf206d71f650e0bc60ff45773d63
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d7cbf7b595b676a62582ccf7442aecaadc18ed3378779bd8c0db981b63b8f49a244392be30907c68a2c8a7d8ff93e8ab524f6ad1f12c97155bfaf44eb895225f
|
7
|
+
data.tar.gz: 6add69682f7e4cdea9a3cd92b5693413bf54d58302a69600929bc6da7065cb414123bf2c6b4938e93428c049272b93d1034598e2b58de32f6340b7a18d3cf086
|
data/CHANGELOG.md
CHANGED
@@ -5,5 +5,14 @@ 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
|
+
### Added
|
9
|
+
|
10
|
+
- VERBOSE env var in tests. Specially useful for integration tests.
|
11
|
+
|
12
|
+
### Changed
|
13
|
+
|
14
|
+
- Use ActiveRecord's logger instead of specifying one in the connection data.
|
15
|
+
|
16
|
+
## [0.1.0.rc.1] - 2016-03-01
|
8
17
|
|
9
18
|
- Initial gem version
|
@@ -12,10 +12,6 @@ module ActiveRecord
|
|
12
12
|
connection = mysql2_connection(config)
|
13
13
|
client = connection.raw_connection
|
14
14
|
|
15
|
-
# TODO: use AR's logger. It must pass a logger instance around, at least
|
16
|
-
# the one the migration uses
|
17
|
-
logger = config[:logger] || $stdout
|
18
|
-
|
19
15
|
config.merge!(
|
20
16
|
logger: logger,
|
21
17
|
runner: PerconaMigrator::Runner.new(logger),
|
@@ -34,8 +30,6 @@ module ActiveRecord
|
|
34
30
|
end
|
35
31
|
|
36
32
|
module ConnectionAdapters
|
37
|
-
# It doesn't implement #create_table as this statement is harmless and
|
38
|
-
# pretty fast. No need to do it with Percona
|
39
33
|
class PerconaMigratorAdapter < AbstractMysqlAdapter
|
40
34
|
|
41
35
|
class Column < AbstractMysqlAdapter::Column
|
@@ -49,7 +43,7 @@ module ActiveRecord
|
|
49
43
|
ADAPTER_NAME = 'Percona'.freeze
|
50
44
|
|
51
45
|
def_delegators :mysql_adapter, :tables, :select_values, :exec_delete,
|
52
|
-
:exec_insert, :exec_query, :last_inserted_id, :select
|
46
|
+
:exec_insert, :exec_query, :last_inserted_id, :select, :create_table
|
53
47
|
|
54
48
|
def initialize(connection, logger, connection_options, config)
|
55
49
|
super
|
@@ -49,7 +49,7 @@ module PerconaMigrator
|
|
49
49
|
#
|
50
50
|
# Logs when the execution started
|
51
51
|
def log_started
|
52
|
-
logger.
|
52
|
+
logger.info "\n#{CYAN}-- #{command}#{NONE}\n\n"
|
53
53
|
end
|
54
54
|
|
55
55
|
# Executes the command outputing any errors
|
@@ -58,7 +58,7 @@ module PerconaMigrator
|
|
58
58
|
def run_command
|
59
59
|
Open3.popen2(command) do |_stdin, stdout, process|
|
60
60
|
@status = process.value
|
61
|
-
logger.
|
61
|
+
logger.info stdout.read
|
62
62
|
end
|
63
63
|
|
64
64
|
if status.nil?
|
@@ -82,7 +82,7 @@ module PerconaMigrator
|
|
82
82
|
|
83
83
|
message = value.zero? ? "#{GREEN}Done!#{NONE}" : "#{RED}Failed!#{NONE}"
|
84
84
|
|
85
|
-
logger.
|
85
|
+
logger.info("\n#{message}")
|
86
86
|
end
|
87
87
|
end
|
88
88
|
end
|
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: 0.1.0.rc.
|
4
|
+
version: 0.1.0.rc.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ilya Zayats
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-03-
|
13
|
+
date: 2016-03-09 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|
@@ -182,4 +182,3 @@ signing_key:
|
|
182
182
|
specification_version: 4
|
183
183
|
summary: pt-online-schema-change runner for ActiveRecord migrations
|
184
184
|
test_files: []
|
185
|
-
has_rdoc:
|