data_migrate 9.1.1 → 9.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Changelog.md +8 -0
- data/gemfiles/rails_7.0.gemfile +1 -1
- data/lib/data_migrate/database_tasks.rb +12 -0
- data/lib/data_migrate/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7fdd9880e5937982737cd3d5c85262db7eeed54aa54f650d0f59425b19f0237c
|
4
|
+
data.tar.gz: 5421f2f74c1239c4e855ae6590a5448d1c0010476c95b212c64f729075e65156
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9317a09e8d0608432a74f4f8bdedf82f2ee208e387aa133ee69753e44ec4777e464ff255b2923e6b74bf58d74db410629167dc3f2179361313e04c41dbbaef03
|
7
|
+
data.tar.gz: 98a90dbaa4ce0d690cec9b53192f962fea550cf2756564a9d243cb31160d701162ec3b46ccc8dbeecdb69d5ccebeb39573b7a105e5d5704f40afdc1c815885d8
|
data/Changelog.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 9.1.2
|
4
|
+
|
5
|
+
- Fix #281 to maintain rails 6.0 support. (#342)
|
6
|
+
|
7
|
+
## 9.1.1
|
8
|
+
|
9
|
+
- Backport Fix data:schema:load for structure.sql (#281)
|
10
|
+
|
3
11
|
## 9.1.0
|
4
12
|
|
5
13
|
- Fix a bug that caused `schema_sha1` in `ar_internal_metadata` to be reset to the `data_schema.rb` file. (#272)
|
data/gemfiles/rails_7.0.gemfile
CHANGED
@@ -74,6 +74,10 @@ module DataMigrate
|
|
74
74
|
# We only require a schema.rb file for the primary database
|
75
75
|
return unless db_config.primary?
|
76
76
|
|
77
|
+
if rails_version_lower_than_6_1?
|
78
|
+
return super.gsub(/(_)?schema\.rb\z/, '\1data_schema.rb')
|
79
|
+
end
|
80
|
+
|
77
81
|
File.join(File.dirname(ActiveRecord::Tasks::DatabaseTasks.schema_dump_path(db_config, format)), schema_file_type)
|
78
82
|
end
|
79
83
|
|
@@ -81,6 +85,10 @@ module DataMigrate
|
|
81
85
|
# to ensure that the sha saved in ar_internal_metadata table
|
82
86
|
# is from the original schema.rb file
|
83
87
|
def schema_sha1(file)
|
88
|
+
if rails_version_lower_than_6_1?
|
89
|
+
return super(file.gsub(/data_schema.rb\z/, 'schema.rb'))
|
90
|
+
end
|
91
|
+
|
84
92
|
ActiveRecord::Tasks::DatabaseTasks.schema_dump_path(ActiveRecord::Base.configurations.configs_for(env_name: ActiveRecord::Tasks::DatabaseTasks.env, name: "primary"))
|
85
93
|
end
|
86
94
|
end
|
@@ -116,5 +124,9 @@ module DataMigrate
|
|
116
124
|
|
117
125
|
sort&.downcase == "asc" ? sort_migrations(migrations) : sort_migrations(migrations).reverse
|
118
126
|
end
|
127
|
+
|
128
|
+
def self.rails_version_lower_than_6_1?
|
129
|
+
Gem::Dependency.new("railties", "< 6.1").match?("railties", Gem.loaded_specs["railties"].version)
|
130
|
+
end
|
119
131
|
end
|
120
132
|
end
|
data/lib/data_migrate/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: data_migrate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 9.1.
|
4
|
+
version: 9.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew J Vargo
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2024-09-24 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activerecord
|
@@ -274,7 +274,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
274
274
|
- !ruby/object:Gem::Version
|
275
275
|
version: '0'
|
276
276
|
requirements: []
|
277
|
-
rubygems_version: 3.4.
|
277
|
+
rubygems_version: 3.4.19
|
278
278
|
signing_key:
|
279
279
|
specification_version: 4
|
280
280
|
summary: Rake tasks to migrate data alongside schema changes.
|