rails-data-migrations 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Appraisals +4 -0
- data/lib/rails_data_migrations/migrator.rb +10 -2
- data/lib/rails_data_migrations/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 79cfbee30eadbf11575d154c03274939c71be97bfbb65fac28ffd9cbae62fa45
|
|
4
|
+
data.tar.gz: bcf02507f8f93df68ee100a86a16d46a7e9e6353aa001979d9c089aa3c34bc77
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 17904e00158879c32bbe50149aca3b1a2a3304349dfe767d28e3d34578772fd01963d8b88916b76fd06bd46555dd08fcdd7d8b9427323f3ef138eca1f31d6330
|
|
7
|
+
data.tar.gz: 02463b37bb5621d9483eb1ebe3d2818cd7dcd780a4a3ec5f8a4ea334e016c038ba26e1467b6e3a66d09feea1e0ca4c99217d1becadaf0b5bf2addcfaeeaba6b3
|
data/Appraisals
CHANGED
|
@@ -38,12 +38,18 @@ module RailsDataMigrations
|
|
|
38
38
|
'db/data_migrations'
|
|
39
39
|
end
|
|
40
40
|
|
|
41
|
+
def rails_6_0?
|
|
42
|
+
Rails::VERSION::MAJOR >= 6
|
|
43
|
+
end
|
|
44
|
+
|
|
41
45
|
def rails_5_2?
|
|
42
46
|
Rails::VERSION::MAJOR > 5 || (Rails::VERSION::MAJOR == 5 && Rails::VERSION::MINOR >= 2)
|
|
43
47
|
end
|
|
44
48
|
|
|
45
49
|
def list_migrations
|
|
46
|
-
if
|
|
50
|
+
if rails_6_0?
|
|
51
|
+
::ActiveRecord::MigrationContext.new(migrations_path, ::ActiveRecord::SchemaMigration).migrations
|
|
52
|
+
elsif rails_5_2?
|
|
47
53
|
::ActiveRecord::MigrationContext.new(migrations_path).migrations
|
|
48
54
|
else
|
|
49
55
|
migrations(migrations_path)
|
|
@@ -60,7 +66,9 @@ module RailsDataMigrations
|
|
|
60
66
|
end
|
|
61
67
|
|
|
62
68
|
def run_migration(direction, migrations_path, version)
|
|
63
|
-
if
|
|
69
|
+
if rails_6_0?
|
|
70
|
+
new(direction, list_migrations, ::ActiveRecord::SchemaMigration, version).run
|
|
71
|
+
elsif rails_5_2?
|
|
64
72
|
new(direction, list_migrations, version).run
|
|
65
73
|
else
|
|
66
74
|
run(direction, migrations_path, version)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rails-data-migrations
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sergey Glukhov
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2019-09-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|
|
@@ -153,8 +153,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
153
153
|
- !ruby/object:Gem::Version
|
|
154
154
|
version: '0'
|
|
155
155
|
requirements: []
|
|
156
|
-
|
|
157
|
-
rubygems_version: 2.7.6
|
|
156
|
+
rubygems_version: 3.0.2
|
|
158
157
|
signing_key:
|
|
159
158
|
specification_version: 4
|
|
160
159
|
summary: Run your data migration tasks in a db:migrate-like manner
|