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 +4 -4
- data/Changelog.md +4 -0
- data/Gemfile.lock +2 -2
- data/gemfiles/rails_6.1.gemfile.lock +1 -1
- data/gemfiles/rails_7.0.gemfile.lock +1 -1
- data/gemfiles/rails_7.1.gemfile.lock +1 -1
- data/lib/data_migrate/data_migrator.rb +4 -0
- data/lib/data_migrate/version.rb +1 -1
- data/tasks/databases.rake +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8b1c79f9a3a6b30aeb19f85dd46e0c7d29885f3552787924f27eeb80f1738e95
|
4
|
+
data.tar.gz: 56ff3a64d6cde029b8a6e9f57c82ebf15ad86aa0140520d5a08c67a8a30e9869
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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.
|
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)
|
@@ -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
|
|
data/lib/data_migrate/version.rb
CHANGED
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 => :
|
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.
|
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-
|
13
|
+
date: 2024-04-29 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activerecord
|