From 0f83746113b572e5bba416a37843ebd5df4c5b31 Mon Sep 17 00:00:00 2001 From: Sebastian Serth Date: Sat, 5 Aug 2023 21:22:47 +0200 Subject: [PATCH] Fix default scope for old migrations --- db/migrate/20140918063522_add_hashed_content_to_files.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/migrate/20140918063522_add_hashed_content_to_files.rb b/db/migrate/20140918063522_add_hashed_content_to_files.rb index f7685207..f4d4a4a1 100644 --- a/db/migrate/20140918063522_add_hashed_content_to_files.rb +++ b/db/migrate/20140918063522_add_hashed_content_to_files.rb @@ -6,7 +6,7 @@ class AddHashedContentToFiles < ActiveRecord::Migration[4.2] reversible do |direction| direction.up do - CodeOcean::File.all.each(&:save) + CodeOcean::File.unscope(:order).all.each(&:save) end end end