diff --git a/db/migrate/20220708203722_correct_notification_target_types.rb b/db/migrate/20220708203722_correct_notification_target_types.rb new file mode 100644 index 00000000..2782eba0 --- /dev/null +++ b/db/migrate/20220708203722_correct_notification_target_types.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +class CorrectNotificationTargetTypes < ActiveRecord::Migration[6.1] + def up + execute "UPDATE notifications SET target_type = 'Appendable' WHERE target_type = 'Appendable::Reaction'" + + execute "UPDATE notifications SET target_type = 'Relationship' WHERE target_type = 'Relationships::Follow'" + end +end diff --git a/db/schema.rb b/db/schema.rb index a7e7ab97..f4a958cb 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2022_07_06_174816) do +ActiveRecord::Schema.define(version: 2022_07_08_203722) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql"