diff --git a/db/migrate/20220706172257_correct_notification_target_type_for_reactions.rb b/db/migrate/20220706172257_correct_notification_target_type_for_reactions.rb new file mode 100644 index 00000000..79e2aa1a --- /dev/null +++ b/db/migrate/20220706172257_correct_notification_target_type_for_reactions.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +class CorrectNotificationTargetTypeForReactions < ActiveRecord::Migration[6.1] + def up + execute "update notifications set target_type = 'Appendable::Reaction' where target_type = 'Appendable';" + end +end diff --git a/db/schema.rb b/db/schema.rb index 3acbc6ff..25c25432 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_06_26_134554) do +ActiveRecord::Schema.define(version: 2022_07_06_172257) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -223,16 +223,6 @@ ActiveRecord::Schema.define(version: 2022_06_26_134554) do t.index ["user_id"], name: "index_services_on_user_id" end - create_table "smiles", id: :bigint, default: -> { "gen_timestamp_id('smiles'::text)" }, force: :cascade do |t| - t.bigint "user_id" - t.bigint "answer_id" - t.datetime "created_at" - t.datetime "updated_at" - t.index ["answer_id"], name: "index_smiles_on_answer_id" - t.index ["user_id", "answer_id"], name: "index_smiles_on_user_id_and_answer_id", unique: true - t.index ["user_id"], name: "index_smiles_on_user_id" - end - create_table "subscriptions", id: :serial, force: :cascade do |t| t.bigint "user_id", null: false t.bigint "answer_id", null: false