FIX: Check all migrations for dropped columns/tables during restore

Previously only post-deploy migrations were being checked for DROPPED_(COLUMNS|TABLES) constants
This commit is contained in:
David Taylor
2021-06-23 16:37:07 +01:00
parent 7e5ad9aaaa
commit d2c5165052
2 changed files with 9 additions and 2 deletions

View File

@ -200,7 +200,9 @@ describe BackupRestore::DatabaseRestorer do
context "readonly functions" do
before do
Migration::SafeMigrate.stubs(:post_migration_path).returns("spec/fixtures/db/post_migrate/drop_column")
BackupRestore::DatabaseRestorer.stubs(:core_migration_files).returns(
Dir[Rails.root.join("spec/fixtures/db/post_migrate/drop_column/**/*.rb")]
)
end
it "doesn't try to drop function when no functions have been created" do