data_migrate 9.3.0 → 9.4.0

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: ef4acf6725174a7fa111477f13b0fa7229598c3a8034c55d4e6baae020bb8036
4
- data.tar.gz: 0c4ee40e59561410c9f31752d48952c141db6af9fdae0f5d83c476241ab7c1fa
3
+ metadata.gz: 8b1c79f9a3a6b30aeb19f85dd46e0c7d29885f3552787924f27eeb80f1738e95
4
+ data.tar.gz: 56ff3a64d6cde029b8a6e9f57c82ebf15ad86aa0140520d5a08c67a8a30e9869
5
5
  SHA512:
6
- metadata.gz: 4a10f7c62212a39ce6e0629a15e61f3be4e55cf93bcac0fb56a85506bfe0bc272833268558776361b14525196c257cb065825a93d17eed0f7a42185e1db162bb
7
- data.tar.gz: 19b397534a6274ffbfcbbe6d71c25dfb3f192a22d37e79491b65818a73906a1d04bed943c45c1f078605d5eff08cfcac23e2cfb1d2640a45ad0065446c44d4d7
6
+ metadata.gz: 6b8d1bb7fd343e44f0cdf623fda3e52875e4efee1327bc4fbf2e3700b1071a96e3b50bb88a63ef4f94c98fcdb068c81f47a4a94d3ee80e91f4d9b47d84893234
7
+ data.tar.gz: bbbcc92d53620c487cdce34a99dd5c41ddb156fa6a8a1a1b8304f1750af2c696df2c1f12079d9ec320b7f1a13497ab35ea20d19a0e1c5f33b3e7a7b2804a8ca0
data/Changelog.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 9.4.0
4
+ - Reset model schema cache before each data migration https://github.com/ilyakatz/data-migrate/pull/307
5
+ - Run load_config rake task before db:migrate:with_data https://github.com/ilyakatz/data-migrate/pull/308
6
+
3
7
  ## 9.3.0
4
8
  - Improve with_data Rake task for multiple database https://github.com/ilyakatz/data-migrate/pull/296
5
9
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- data_migrate (9.3.0)
4
+ data_migrate (9.4.0)
5
5
  activerecord (>= 6.1)
6
6
  railties (>= 6.1)
7
7
 
@@ -116,7 +116,7 @@ GEM
116
116
  rainbow (3.1.1)
117
117
  rake (13.1.0)
118
118
  rb-readline (0.5.5)
119
- rdoc (6.6.2)
119
+ rdoc (6.6.3.1)
120
120
  psych (>= 4.0.0)
121
121
  regexp_parser (2.9.0)
122
122
  reline (0.4.3)
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- data_migrate (9.3.0)
4
+ data_migrate (9.4.0)
5
5
  activerecord (>= 6.1)
6
6
  railties (>= 6.1)
7
7
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- data_migrate (9.3.0)
4
+ data_migrate (9.4.0)
5
5
  activerecord (>= 6.1)
6
6
  railties (>= 6.1)
7
7
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- data_migrate (9.3.0)
4
+ data_migrate (9.4.0)
5
5
  activerecord (>= 6.1)
6
6
  railties (>= 6.1)
7
7
 
@@ -54,6 +54,10 @@ module DataMigrate
54
54
 
55
55
  #TODO: this was added to be backward compatible, need to re-evaluate
56
56
  def run(direction, migration_paths, version)
57
+ # Ensure all Active Record model cache is reset for each data migration
58
+ # As recommended in: https://github.com/rails/rails/blob/da21c2e9812e5eb0698fba4a9aa38632fc004432/activerecord/lib/active_record/migration.rb#L467-L470
59
+ ActiveRecord::Base.descendants.each(&:reset_column_information)
60
+
57
61
  DataMigrate::MigrationContext.new(migration_paths).run(direction, version)
58
62
  end
59
63
 
@@ -1,3 +1,3 @@
1
1
  module DataMigrate
2
- VERSION = "9.3.0".freeze
2
+ VERSION = "9.4.0".freeze
3
3
  end
data/tasks/databases.rake CHANGED
@@ -5,7 +5,7 @@ require 'data_migrate/tasks/data_migrate_tasks'
5
5
  namespace :db do
6
6
  namespace :migrate do
7
7
  desc "Migrate the database data and schema (options: VERSION=x, VERBOSE=false)."
8
- task :with_data => :environment do
8
+ task :with_data => :load_config do
9
9
  DataMigrate::DataMigrator.create_data_schema_table
10
10
  ActiveRecord::Migration.verbose = ENV["VERBOSE"] ? ENV["VERBOSE"] == "true" : true
11
11
 
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.3.0
4
+ version: 9.4.0
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: 2024-03-02 00:00:00.000000000 Z
13
+ date: 2024-04-29 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activerecord