From a0f32061e574449924d09b71331188eed27f0bea Mon Sep 17 00:00:00 2001 From: Chris Roberts Date: Wed, 14 Aug 2024 12:04:19 -0400 Subject: [PATCH] Add DB Migration --- ...240813141845_rename_centos_stream_mirror_to_centos.rb | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 db/migrate/20240813141845_rename_centos_stream_mirror_to_centos.rb diff --git a/db/migrate/20240813141845_rename_centos_stream_mirror_to_centos.rb b/db/migrate/20240813141845_rename_centos_stream_mirror_to_centos.rb new file mode 100644 index 00000000000..2a12de64c76 --- /dev/null +++ b/db/migrate/20240813141845_rename_centos_stream_mirror_to_centos.rb @@ -0,0 +1,9 @@ +class RenameCentosStreamMirrorToCentos < ActiveRecord::Migration[6.1] + def up + Medium.unscoped.where(name: "CentOS Stream 9 mirror").update_all(name: "CentOS mirror") + end + + def down + Medium.unscoped.where(name: "CentOS mirror").update_all(name: "CentOS Stream 9 mirror") + end +end