Skip to content

Commit 37b6484

Browse files
committed
Adjust migration for user curves
1 parent fa08856 commit 37b6484

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

db/migrate/20250403101055_convert_user_curves_to_model.rb

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@ class ConvertUserCurvesToModel < ActiveRecord::Migration[7.0]
44
include ETEngine::ScenarioMigration
55

66
def up
7-
total_scenarios = Scenario.migratable.count
8-
97
migrate_scenarios(raise_if_no_changes: false) do |scenario|
10-
processed += 1
118
scenario_migrated = false
129

1310
scenario.attachments.find_each do |attachment|
@@ -44,11 +41,8 @@ def up
4441
end
4542

4643
# Marks the scenario as changed so it's counted by ScenarioMigration.
47-
scenario.touch if scenario_migrated? # TODO: Either keep this and remove "raise_if_no_changes: false" or remove this
48-
end
44+
scenario.touch if scenario_migrated
4945
end
50-
51-
raise ETEngine::ScenarioMigration::NoScenariosMigrated if migrated.zero?
5246
end
5347

5448
def down

0 commit comments

Comments
 (0)