From c4456b0fc2b3d54f25afea2e22cee32a8c6fe73f Mon Sep 17 00:00:00 2001 From: Vincent Prigent Date: Tue, 4 Jun 2024 12:23:57 +1200 Subject: [PATCH 1/5] Support rails 7.2 --- .github/workflows/build.yml | 1 + Appraisals | 5 + Changelog.md | 4 + Gemfile.lock | 9 +- README.md | 5 +- gemfiles/rails_6.1.gemfile.lock | 4 + gemfiles/rails_7.0.gemfile.lock | 4 + gemfiles/rails_7.1.gemfile.lock | 4 + gemfiles/rails_7.2.gemfile | 7 + gemfiles/rails_7.2.gemfile.lock | 261 ++++++++++++++++++++ lib/data_migrate/rails_helper.rb | 17 +- spec/data_migrate/migration_context_spec.rb | 11 +- tasks/databases.rake | 1 + 13 files changed, 325 insertions(+), 8 deletions(-) create mode 100644 gemfiles/rails_7.2.gemfile create mode 100644 gemfiles/rails_7.2.gemfile.lock diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index de73c902..6ac140f0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,6 +19,7 @@ jobs: - gemfiles/rails_6.1.gemfile - gemfiles/rails_7.0.gemfile - gemfiles/rails_7.1.gemfile + - gemfiles/rails_7.2.gemfile runs-on: ubuntu-latest env: BUNDLE_GEMFILE: ${{ matrix.gemfile }} diff --git a/Appraisals b/Appraisals index 7eec0afd..ded82fbd 100644 --- a/Appraisals +++ b/Appraisals @@ -9,3 +9,8 @@ end appraise 'rails-7.1' do gem 'rails', '7.1.0' end + + +appraise 'rails-7.2' do + gem 'rails', '7.2.0.beta1' +end diff --git a/Changelog.md b/Changelog.md index 5a184fed..8764c451 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,9 @@ # Changelog + +## 9.5.0 +- Support Rails 7.2 + ## 9.4.2 - Fix db:prepare:with_data task diff --git a/Gemfile.lock b/Gemfile.lock index bbbdbca1..01d208b5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -71,9 +71,11 @@ GEM method_source (1.0.0) minitest (5.23.1) mutex_m (0.2.0) - nokogiri (1.16.5-arm64-darwin) + nokogiri (1.16.2-aarch64-linux) racc (~> 1.4) - nokogiri (1.16.5-x86_64-linux) + nokogiri (1.16.2-arm64-darwin) + racc (~> 1.4) + nokogiri (1.16.2-x86_64-linux) racc (~> 1.4) overcommit (0.63.0) childprocess (>= 0.6.3, < 6) @@ -149,6 +151,8 @@ GEM rubocop-ast (1.30.0) parser (>= 3.2.1.0) ruby-progressbar (1.13.0) + ruby2_keywords (0.0.5) + sqlite3 (1.7.2-aarch64-linux) sqlite3 (1.7.2-arm64-darwin) sqlite3 (1.7.2-x86_64-linux) stringio (3.1.0) @@ -163,6 +167,7 @@ GEM zeitwerk (2.6.13) PLATFORMS + aarch64-linux arm64-darwin-22 arm64-darwin-23 x86_64-linux diff --git a/README.md b/README.md index e6aca129..00397fb8 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ table to track all migrations. ## Rails Support -Support Rails 6.1 through 7.1 +Support Rails 6.1 through 7.2 #### v1 @@ -163,10 +163,11 @@ Then, in the Engine's `db/data` folder, you can add data migrations and run them Run tests for a specific version of Rails ``` -bundle exec appraisal install + bundle exec appraisal rails-6.1 rspec bundle exec appraisal rails-7.0 rspec bundle exec appraisal rails-7.1 rspec +bundle exec appraisal rails-7.2 rspec ``` ## Thanks diff --git a/gemfiles/rails_6.1.gemfile.lock b/gemfiles/rails_6.1.gemfile.lock index 54d78e85..fdd6a657 100644 --- a/gemfiles/rails_6.1.gemfile.lock +++ b/gemfiles/rails_6.1.gemfile.lock @@ -108,6 +108,8 @@ GEM net-smtp (0.4.0.1) net-protocol nio4r (2.7.0) + nokogiri (1.16.2-aarch64-linux) + racc (~> 1.4) nokogiri (1.16.2-arm64-darwin) racc (~> 1.4) nokogiri (1.16.2-x86_64-linux) @@ -193,6 +195,7 @@ GEM actionpack (>= 5.2) activesupport (>= 5.2) sprockets (>= 3.0.0) + sqlite3 (1.7.2-aarch64-linux) sqlite3 (1.7.2-arm64-darwin) sqlite3 (1.7.2-x86_64-linux) thor (1.3.1) @@ -207,6 +210,7 @@ GEM zeitwerk (2.6.13) PLATFORMS + aarch64-linux arm64-darwin-22 arm64-darwin-23 x86_64-linux diff --git a/gemfiles/rails_7.0.gemfile.lock b/gemfiles/rails_7.0.gemfile.lock index 9d99b69b..cf45d9cd 100644 --- a/gemfiles/rails_7.0.gemfile.lock +++ b/gemfiles/rails_7.0.gemfile.lock @@ -115,6 +115,8 @@ GEM net-smtp (0.4.0.1) net-protocol nio4r (2.7.0) + nokogiri (1.16.2-aarch64-linux) + racc (~> 1.4) nokogiri (1.16.2-arm64-darwin) racc (~> 1.4) nokogiri (1.16.2-x86_64-linux) @@ -194,6 +196,7 @@ GEM rubocop-ast (1.29.0) parser (>= 3.2.1.0) ruby-progressbar (1.13.0) + sqlite3 (1.7.2-aarch64-linux) sqlite3 (1.7.2-arm64-darwin) sqlite3 (1.7.2-x86_64-linux) thor (1.3.1) @@ -208,6 +211,7 @@ GEM zeitwerk (2.6.13) PLATFORMS + aarch64-linux arm64-darwin-22 arm64-darwin-23 x86_64-linux diff --git a/gemfiles/rails_7.1.gemfile.lock b/gemfiles/rails_7.1.gemfile.lock index b1066e6c..f78e9d29 100644 --- a/gemfiles/rails_7.1.gemfile.lock +++ b/gemfiles/rails_7.1.gemfile.lock @@ -133,6 +133,8 @@ GEM net-smtp (0.4.0.1) net-protocol nio4r (2.7.0) + nokogiri (1.16.2-aarch64-linux) + racc (~> 1.4) nokogiri (1.16.2-arm64-darwin) racc (~> 1.4) nokogiri (1.16.2-x86_64-linux) @@ -225,6 +227,7 @@ GEM parser (>= 3.2.1.0) ruby-progressbar (1.13.0) ruby2_keywords (0.0.5) + sqlite3 (1.7.2-aarch64-linux) sqlite3 (1.7.2-arm64-darwin) sqlite3 (1.7.2-x86_64-linux) stringio (3.1.0) @@ -241,6 +244,7 @@ GEM zeitwerk (2.6.13) PLATFORMS + aarch64-linux arm64-darwin-22 arm64-darwin-23 x86_64-linux diff --git a/gemfiles/rails_7.2.gemfile b/gemfiles/rails_7.2.gemfile new file mode 100644 index 00000000..6730ca89 --- /dev/null +++ b/gemfiles/rails_7.2.gemfile @@ -0,0 +1,7 @@ +# This file was generated by Appraisal + +source "http://rubygems.org" + +gem "rails", "7.2.0.beta1" + +gemspec path: "../" diff --git a/gemfiles/rails_7.2.gemfile.lock b/gemfiles/rails_7.2.gemfile.lock new file mode 100644 index 00000000..70e69bb9 --- /dev/null +++ b/gemfiles/rails_7.2.gemfile.lock @@ -0,0 +1,261 @@ +PATH + remote: .. + specs: + data_migrate (9.4.0) + activerecord (>= 6.1) + railties (>= 6.1) + +GEM + remote: http://rubygems.org/ + specs: + actioncable (7.2.0.beta1) + actionpack (= 7.2.0.beta1) + activesupport (= 7.2.0.beta1) + nio4r (~> 2.0) + websocket-driver (>= 0.6.1) + zeitwerk (~> 2.6) + actionmailbox (7.2.0.beta1) + actionpack (= 7.2.0.beta1) + activejob (= 7.2.0.beta1) + activerecord (= 7.2.0.beta1) + activestorage (= 7.2.0.beta1) + activesupport (= 7.2.0.beta1) + mail (>= 2.8.0) + actionmailer (7.2.0.beta1) + actionpack (= 7.2.0.beta1) + actionview (= 7.2.0.beta1) + activejob (= 7.2.0.beta1) + activesupport (= 7.2.0.beta1) + mail (>= 2.8.0) + rails-dom-testing (~> 2.2) + actionpack (7.2.0.beta1) + actionview (= 7.2.0.beta1) + activesupport (= 7.2.0.beta1) + nokogiri (>= 1.8.5) + racc + rack (>= 2.2.4) + rack-session (>= 1.0.1) + rack-test (>= 0.6.3) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + useragent (~> 0.16) + actiontext (7.2.0.beta1) + actionpack (= 7.2.0.beta1) + activerecord (= 7.2.0.beta1) + activestorage (= 7.2.0.beta1) + activesupport (= 7.2.0.beta1) + globalid (>= 0.6.0) + nokogiri (>= 1.8.5) + actionview (7.2.0.beta1) + activesupport (= 7.2.0.beta1) + builder (~> 3.1) + erubi (~> 1.11) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + activejob (7.2.0.beta1) + activesupport (= 7.2.0.beta1) + globalid (>= 0.3.6) + activemodel (7.2.0.beta1) + activesupport (= 7.2.0.beta1) + activerecord (7.2.0.beta1) + activemodel (= 7.2.0.beta1) + activesupport (= 7.2.0.beta1) + timeout (>= 0.4.0) + activestorage (7.2.0.beta1) + actionpack (= 7.2.0.beta1) + activejob (= 7.2.0.beta1) + activerecord (= 7.2.0.beta1) + activesupport (= 7.2.0.beta1) + marcel (~> 1.0) + activesupport (7.2.0.beta1) + base64 + bigdecimal + concurrent-ruby (~> 1.0, >= 1.3.1) + connection_pool (>= 2.2.5) + drb + i18n (>= 1.6, < 2) + minitest (>= 5.1) + tzinfo (~> 2.0, >= 2.0.5) + appraisal (2.5.0) + bundler + rake + thor (>= 0.14.0) + ast (2.4.2) + base64 (0.2.0) + bigdecimal (3.1.8) + builder (3.2.4) + childprocess (5.0.0) + coderay (1.1.3) + concurrent-ruby (1.3.1) + connection_pool (2.4.1) + crass (1.0.6) + date (3.3.4) + diff-lcs (1.5.1) + drb (2.2.1) + erubi (1.12.0) + globalid (1.2.1) + activesupport (>= 6.1) + i18n (1.14.5) + concurrent-ruby (~> 1.0) + iniparse (1.5.0) + io-console (0.7.2) + irb (1.13.1) + rdoc (>= 4.0.0) + reline (>= 0.4.2) + json (2.7.2) + language_server-protocol (3.17.0.3) + loofah (2.22.0) + crass (~> 1.0.2) + nokogiri (>= 1.12.0) + mail (2.8.1) + mini_mime (>= 0.1.1) + net-imap + net-pop + net-smtp + marcel (1.0.4) + method_source (1.1.0) + mini_mime (1.1.5) + minitest (5.23.1) + net-imap (0.4.11) + date + net-protocol + net-pop (0.1.2) + net-protocol + net-protocol (0.2.2) + timeout + net-smtp (0.5.0) + net-protocol + nio4r (2.7.3) + nokogiri (1.16.5-aarch64-linux) + racc (~> 1.4) + nokogiri (1.16.5-arm64-darwin) + racc (~> 1.4) + nokogiri (1.16.5-x86_64-linux) + racc (~> 1.4) + overcommit (0.63.0) + childprocess (>= 0.6.3, < 6) + iniparse (~> 1.4) + rexml (~> 3.2) + parallel (1.24.0) + parser (3.3.1.0) + ast (~> 2.4.1) + racc + pry (0.14.2) + coderay (~> 1.1) + method_source (~> 1.0) + psych (5.1.2) + stringio + racc (1.8.0) + rack (3.0.11) + rack-session (2.0.0) + rack (>= 3.0.0) + rack-test (2.1.0) + rack (>= 1.3) + rackup (2.1.0) + rack (>= 3) + webrick (~> 1.8) + rails (7.2.0.beta1) + actioncable (= 7.2.0.beta1) + actionmailbox (= 7.2.0.beta1) + actionmailer (= 7.2.0.beta1) + actionpack (= 7.2.0.beta1) + actiontext (= 7.2.0.beta1) + actionview (= 7.2.0.beta1) + activejob (= 7.2.0.beta1) + activemodel (= 7.2.0.beta1) + activerecord (= 7.2.0.beta1) + activestorage (= 7.2.0.beta1) + activesupport (= 7.2.0.beta1) + bundler (>= 1.15.0) + railties (= 7.2.0.beta1) + rails-dom-testing (2.2.0) + activesupport (>= 5.0.0) + minitest + nokogiri (>= 1.6) + rails-html-sanitizer (1.6.0) + loofah (~> 2.21) + nokogiri (~> 1.14) + railties (7.2.0.beta1) + actionpack (= 7.2.0.beta1) + activesupport (= 7.2.0.beta1) + irb (~> 1.13) + rackup (>= 1.0.0) + rake (>= 12.2) + thor (~> 1.0, >= 1.2.2) + zeitwerk (~> 2.6) + rainbow (3.1.1) + rake (13.2.1) + rb-readline (0.5.5) + rdoc (6.7.0) + psych (>= 4.0.0) + regexp_parser (2.9.2) + reline (0.5.8) + io-console (~> 0.5) + rexml (3.2.8) + strscan (>= 3.0.9) + rspec (3.13.0) + rspec-core (~> 3.13.0) + rspec-expectations (~> 3.13.0) + rspec-mocks (~> 3.13.0) + rspec-core (3.13.0) + rspec-support (~> 3.13.0) + rspec-expectations (3.13.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.13.0) + rspec-mocks (3.13.1) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.13.0) + rspec-support (3.13.1) + rubocop (1.64.0) + json (~> 2.3) + language_server-protocol (>= 3.17.0) + parallel (~> 1.10) + parser (>= 3.3.0.2) + rainbow (>= 2.2.2, < 4.0) + regexp_parser (>= 1.8, < 3.0) + rexml (>= 3.2.5, < 4.0) + rubocop-ast (>= 1.31.1, < 2.0) + ruby-progressbar (~> 1.7) + unicode-display_width (>= 2.4.0, < 3.0) + rubocop-ast (1.31.3) + parser (>= 3.3.1.0) + ruby-progressbar (1.13.0) + sqlite3 (2.0.2-aarch64-linux-gnu) + sqlite3 (2.0.2-arm64-darwin) + sqlite3 (2.0.2-x86_64-linux-gnu) + stringio (3.1.0) + strscan (3.1.0) + thor (1.3.1) + timecop (0.9.8) + timeout (0.4.1) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) + unicode-display_width (2.5.0) + useragent (0.16.10) + webrick (1.8.1) + websocket-driver (0.7.6) + websocket-extensions (>= 0.1.0) + websocket-extensions (0.1.5) + zeitwerk (2.6.15) + +PLATFORMS + aarch64-linux + arm64-darwin-23 + x86_64-linux + +DEPENDENCIES + appraisal + data_migrate! + overcommit + pry + rails (= 7.2.0.beta1) + rake + rb-readline + rspec + rspec-core + rubocop + sqlite3 + timecop + +BUNDLED WITH + 2.4.17 diff --git a/lib/data_migrate/rails_helper.rb b/lib/data_migrate/rails_helper.rb index 9f94e73a..330f50a9 100644 --- a/lib/data_migrate/rails_helper.rb +++ b/lib/data_migrate/rails_helper.rb @@ -1,6 +1,11 @@ module DataMigrate class RailsHelper class << self + def rails_version_equal_to_or_higher_than_7_2 + return @equal_to_or_higher_than_7_2 if defined?(@equal_to_or_higher_than_7_2) + + @equal_to_or_higher_than_7_2 = Gem::Dependency.new("railties", ">= 7.2.0.alpha").match?("railties", Gem.loaded_specs["railties"].version, true) + end def rails_version_equal_to_or_higher_than_7_1 return @equal_to_or_higher_than_7_1 if defined?(@equal_to_or_higher_than_7_1) @@ -14,7 +19,9 @@ def rails_version_equal_to_or_higher_than_7_0 end def internal_metadata - if rails_version_equal_to_or_higher_than_7_1 + if rails_version_equal_to_or_higher_than_7_2 + ActiveRecord::Base.connection.pool.internal_metadata + elsif rails_version_equal_to_or_higher_than_7_1 ActiveRecord::Base.connection.internal_metadata else ActiveRecord::InternalMetadata @@ -22,7 +29,9 @@ def internal_metadata end def schema_migration - if rails_version_equal_to_or_higher_than_7_1 + if rails_version_equal_to_or_higher_than_7_2 + ActiveRecord::Base.connection.pool.schema_migration + elsif rails_version_equal_to_or_higher_than_7_1 ActiveRecord::Base.connection.schema_migration else ActiveRecord::SchemaMigration @@ -54,7 +63,9 @@ def data_schema_delete_version(version) end def data_schema_migration - if rails_version_equal_to_or_higher_than_7_1 + if rails_version_equal_to_or_higher_than_7_2 + DataMigrate::DataSchemaMigration.new(ActiveRecord::Tasks::DatabaseTasks.migration_connection.pool) + elsif rails_version_equal_to_or_higher_than_7_1 DataMigrate::DataSchemaMigration.new(ActiveRecord::Tasks::DatabaseTasks.migration_connection) else DataMigrate::DataSchemaMigration diff --git a/spec/data_migrate/migration_context_spec.rb b/spec/data_migrate/migration_context_spec.rb index c80155d4..6b6ce80e 100644 --- a/spec/data_migrate/migration_context_spec.rb +++ b/spec/data_migrate/migration_context_spec.rb @@ -4,7 +4,7 @@ describe DataMigrate::DataMigrator do let(:context) { DataMigrate::MigrationContext.new("spec/db/data") } - let(:schema_context) { ActiveRecord::MigrationContext.new("spec/db/migrate", ActiveRecord::Base.connection.schema_migration) } + let(:schema_context) { ActiveRecord::MigrationContext.new("spec/db/migrate", ar_schema_migration()) } let(:db_config) do { adapter: "sqlite3", @@ -105,4 +105,13 @@ expect(versions.count).to eq(0) end end + + # schema migration changed in Rails 7.2, from the connection to the pool object. + def ar_schema_migration + if ActiveRecord::Base.connection.pool.respond_to?(:schema_migration) + ActiveRecord::Base.connection.pool.schema_migration + else + ActiveRecord::Base.connection.schema_migration + end + end end diff --git a/tasks/databases.rake b/tasks/databases.rake index 7c92515f..5bdcb108 100644 --- a/tasks/databases.rake +++ b/tasks/databases.rake @@ -7,6 +7,7 @@ namespace :db do desc "Migrate the database data and schema (options: VERSION=x, VERBOSE=false)." task :with_data => :load_config do DataMigrate::DatabaseTasks.migrate_with_data + Rake::Task["db:_dump"].invoke Rake::Task["data:dump"].invoke end From e4aefab5a33ea9a21f80048420f3aa12952dca93 Mon Sep 17 00:00:00 2001 From: Vincent Prigent Date: Sun, 9 Jun 2024 22:31:41 +0200 Subject: [PATCH 2/5] Use connection_pool over chaining calls --- Changelog.md | 2 +- lib/data_migrate/rails_helper.rb | 6 +++--- spec/data_migrate/migration_context_spec.rb | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Changelog.md b/Changelog.md index 8764c451..effe76a9 100644 --- a/Changelog.md +++ b/Changelog.md @@ -2,7 +2,7 @@ ## 9.5.0 -- Support Rails 7.2 +- Support Rails 7.2 https://github.com/ilyakatz/data-migrate/pull/312 ## 9.4.2 - Fix db:prepare:with_data task diff --git a/lib/data_migrate/rails_helper.rb b/lib/data_migrate/rails_helper.rb index 330f50a9..d71ae443 100644 --- a/lib/data_migrate/rails_helper.rb +++ b/lib/data_migrate/rails_helper.rb @@ -20,7 +20,7 @@ def rails_version_equal_to_or_higher_than_7_0 def internal_metadata if rails_version_equal_to_or_higher_than_7_2 - ActiveRecord::Base.connection.pool.internal_metadata + ActiveRecord::Base.connection_pool.internal_metadata elsif rails_version_equal_to_or_higher_than_7_1 ActiveRecord::Base.connection.internal_metadata else @@ -30,7 +30,7 @@ def internal_metadata def schema_migration if rails_version_equal_to_or_higher_than_7_2 - ActiveRecord::Base.connection.pool.schema_migration + ActiveRecord::Base.connection_pool.schema_migration elsif rails_version_equal_to_or_higher_than_7_1 ActiveRecord::Base.connection.schema_migration else @@ -64,7 +64,7 @@ def data_schema_delete_version(version) def data_schema_migration if rails_version_equal_to_or_higher_than_7_2 - DataMigrate::DataSchemaMigration.new(ActiveRecord::Tasks::DatabaseTasks.migration_connection.pool) + DataMigrate::DataSchemaMigration.new(ActiveRecord::Tasks::DatabaseTasks.migration_connection_pool) elsif rails_version_equal_to_or_higher_than_7_1 DataMigrate::DataSchemaMigration.new(ActiveRecord::Tasks::DatabaseTasks.migration_connection) else diff --git a/spec/data_migrate/migration_context_spec.rb b/spec/data_migrate/migration_context_spec.rb index 6b6ce80e..4d147509 100644 --- a/spec/data_migrate/migration_context_spec.rb +++ b/spec/data_migrate/migration_context_spec.rb @@ -108,8 +108,8 @@ # schema migration changed in Rails 7.2, from the connection to the pool object. def ar_schema_migration - if ActiveRecord::Base.connection.pool.respond_to?(:schema_migration) - ActiveRecord::Base.connection.pool.schema_migration + if ActiveRecord::Base.connection_pool.respond_to?(:schema_migration) + ActiveRecord::Base.connection_pool.schema_migration else ActiveRecord::Base.connection.schema_migration end From 55b86f6496171a5be093495e82cf7cc16e780545 Mon Sep 17 00:00:00 2001 From: Vincent Prigent Date: Thu, 15 Aug 2024 14:50:33 +0200 Subject: [PATCH 3/5] Drop ruby 3.0 from test matrix --- .github/workflows/build.yml | 1 - gemfiles/rails_7.2.gemfile.lock | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6ac140f0..c31c416f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,7 +11,6 @@ jobs: matrix: os: [ "ubuntu-20.04" ] ruby: - - '3.0' - '3.1' - '3.2' - '3.3' diff --git a/gemfiles/rails_7.2.gemfile.lock b/gemfiles/rails_7.2.gemfile.lock index 70e69bb9..751f9e19 100644 --- a/gemfiles/rails_7.2.gemfile.lock +++ b/gemfiles/rails_7.2.gemfile.lock @@ -1,7 +1,7 @@ PATH remote: .. specs: - data_migrate (9.4.0) + data_migrate (9.4.2) activerecord (>= 6.1) railties (>= 6.1) From d33409790486feae1a457c35e41f2e639609ae9b Mon Sep 17 00:00:00 2001 From: Ngan Pham Date: Thu, 15 Aug 2024 16:40:32 -0700 Subject: [PATCH 4/5] Update spec/data_migrate/migration_context_spec.rb Co-authored-by: Ronan --- spec/data_migrate/migration_context_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/data_migrate/migration_context_spec.rb b/spec/data_migrate/migration_context_spec.rb index 4d147509..d9951378 100644 --- a/spec/data_migrate/migration_context_spec.rb +++ b/spec/data_migrate/migration_context_spec.rb @@ -4,7 +4,7 @@ describe DataMigrate::DataMigrator do let(:context) { DataMigrate::MigrationContext.new("spec/db/data") } - let(:schema_context) { ActiveRecord::MigrationContext.new("spec/db/migrate", ar_schema_migration()) } + let(:schema_context) { ActiveRecord::MigrationContext.new("spec/db/migrate", ar_schema_migration) } let(:db_config) do { adapter: "sqlite3", From 04159f8bd82aed953a518601ad9c10aa5c7966f7 Mon Sep 17 00:00:00 2001 From: Ngan Pham Date: Thu, 15 Aug 2024 16:40:49 -0700 Subject: [PATCH 5/5] Update tasks/databases.rake Co-authored-by: Ronan --- tasks/databases.rake | 1 - 1 file changed, 1 deletion(-) diff --git a/tasks/databases.rake b/tasks/databases.rake index 5bdcb108..7c92515f 100644 --- a/tasks/databases.rake +++ b/tasks/databases.rake @@ -7,7 +7,6 @@ namespace :db do desc "Migrate the database data and schema (options: VERSION=x, VERBOSE=false)." task :with_data => :load_config do DataMigrate::DatabaseTasks.migrate_with_data - Rake::Task["db:_dump"].invoke Rake::Task["data:dump"].invoke end