From 2eea0d3ef5ef2c7f8e48027316dc2a2d0ce8ca9c Mon Sep 17 00:00:00 2001 From: Stephen Date: Sun, 17 Mar 2024 05:16:17 +1000 Subject: [PATCH] update ActiveRecord::Migration function --- spec/beef/api/auth_rate_spec.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spec/beef/api/auth_rate_spec.rb b/spec/beef/api/auth_rate_spec.rb index f9f94bbb6..3d757133d 100644 --- a/spec/beef/api/auth_rate_spec.rb +++ b/spec/beef/api/auth_rate_spec.rb @@ -48,9 +48,12 @@ RSpec.describe 'BeEF API Rate Limit' do if Gem.loaded_specs['otr-activerecord'].version > Gem::Version.create('1.4.2') OTR::ActiveRecord.establish_connection! end + + # Migrate (if required) + ActiveRecord::Migration.verbose = false # silence activerecord migration stdout messages context = ActiveRecord::Migration.new.migration_context if context.needs_migration? - ActiveRecord::Migrator.new(:up, context.migrations, context.schema_migration).migrate + ActiveRecord::Migrator.new(:up, context.migrations, context.schema_migration, context.internal_metadata).migrate end sleep 2