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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e439cb5180eca3cf1195560f8942178ac4ca64304489f1ec3ce3b1efa3462be4
4
- data.tar.gz: efe9f8166f6fd7080d68b6dc050ac63124528d66ccc0465a505cd1002bbd7dce
3
+ metadata.gz: 7fdd9880e5937982737cd3d5c85262db7eeed54aa54f650d0f59425b19f0237c
4
+ data.tar.gz: 5421f2f74c1239c4e855ae6590a5448d1c0010476c95b212c64f729075e65156
5
5
  SHA512:
6
- metadata.gz: 64ca4079825785ca93b6e636a62b9117d15e5b6e10c667467657b229833014286e3339c644360f5ffa1ddab83bafca3dbff0397e5b1ecaa75eb646fe87b637d0
7
- data.tar.gz: c9dced4b2efe056e2519ad8493c2d25a165d122f6350569a191b182d8d6f6e189f40fbff744f1b31039810636cd603b18363618080b4eb502570e1943828631d
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)
@@ -3,6 +3,6 @@
3
3
  source "http://rubygems.org"
4
4
 
5
5
  gem "sqlite3", "~> 1.4"
6
- gem "rails", "~> 7.0"
6
+ gem "rails", "~> 7.0.0"
7
7
 
8
8
  gemspec path: "../"
@@ -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
@@ -1,3 +1,3 @@
1
1
  module DataMigrate
2
- VERSION = "9.1.1".freeze
2
+ VERSION = "9.1.2".freeze
3
3
  end
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.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: 2023-08-02 00:00:00.000000000 Z
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.10
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.