migration_tools 1.5.0 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/migration_tools/tasks.rb +18 -8
- metadata +6 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 559ef9620f9ab388bc51427bb1d4a661d22c0ab07f440c4e1587dbd048186e5d
|
4
|
+
data.tar.gz: f46b6a2355613259abe718b355132dc62b3f3e537569907652ac12bab08f9ebc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 44a48c610a3565f332fe4c9e51b2275f8c7016efe72c53698010d0f89787d3316e3702816f8bf6574a80c287bdf757fb8fdd3f0daa39c69cb1de30cef546a340
|
7
|
+
data.tar.gz: 942b0e309ef6104c8f69f368f0f96ce9345a6ec13abc98fff7cd451786d8bdf6a9d6bed5bb8ce425aa348ea3693626d9aa03599dbff784dce8c8a2479a41590e
|
@@ -28,15 +28,25 @@ module MigrationTools
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def migrator(target_version = nil)
|
31
|
-
if ActiveRecord::VERSION::MAJOR
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
ActiveRecord::
|
31
|
+
if ActiveRecord::VERSION::MAJOR >= 6
|
32
|
+
migrate_up(ActiveRecord::MigrationContext.new(
|
33
|
+
migrations_paths,
|
34
|
+
ActiveRecord::SchemaMigration
|
35
|
+
).migrations, target_version)
|
36
|
+
elsif ActiveRecord::VERSION::MAJOR == 5 && ActiveRecord::VERSION::MINOR == 2
|
37
|
+
migrate_up(ActiveRecord::MigrationContext.new(migrations_paths).migrations, target_version)
|
38
|
+
elsif ActiveRecord::VERSION::MAJOR > 3
|
39
|
+
migrate_up(ActiveRecord::Migrator.migrations(migrations_paths), target_version)
|
38
40
|
else
|
39
|
-
|
41
|
+
migrate_up(migrations_paths, target_version)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
def migrate_up(migrations, target_version)
|
46
|
+
if ActiveRecord::VERSION::MAJOR >= 6
|
47
|
+
ActiveRecord::Migrator.new(:up, migrations, ActiveRecord::SchemaMigration, target_version)
|
48
|
+
else
|
49
|
+
ActiveRecord::Migrator.new(:up, migrations, target_version)
|
40
50
|
end
|
41
51
|
end
|
42
52
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: migration_tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Morten Primdahl
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-03-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: 3.2.6
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '6.
|
22
|
+
version: '6.1'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: 3.2.6
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '6.
|
32
|
+
version: '6.1'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: rake
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -139,7 +139,7 @@ files:
|
|
139
139
|
- lib/migration_tools/tasks.rb
|
140
140
|
homepage: https://github.com/zendesk/migration_tools
|
141
141
|
licenses:
|
142
|
-
- Apache
|
142
|
+
- Apache-2.0
|
143
143
|
metadata: {}
|
144
144
|
post_install_message:
|
145
145
|
rdoc_options: []
|
@@ -156,8 +156,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
156
156
|
- !ruby/object:Gem::Version
|
157
157
|
version: '0'
|
158
158
|
requirements: []
|
159
|
-
|
160
|
-
rubygems_version: 2.6.14
|
159
|
+
rubygems_version: 3.0.3
|
161
160
|
signing_key:
|
162
161
|
specification_version: 4
|
163
162
|
summary: Encourage migrations that do not require downtime
|