Add group_key column to notifications

This commit is contained in:
Claire 2024-04-10 12:04:30 +02:00
parent 3a7aec2807
commit 18913854be
3 changed files with 10 additions and 1 deletions

View file

@ -13,6 +13,7 @@
# from_account_id :bigint(8) not null
# type :string
# filtered :boolean default(FALSE), not null
# group_key :string
#
class Notification < ApplicationRecord

View file

@ -0,0 +1,7 @@
# frozen_string_literal: true
class AddGroupKeyToNotifications < ActiveRecord::Migration[7.1]
def change
add_column :notifications, :group_key, :string
end
end

View file

@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[7.1].define(version: 2024_05_10_192043) do
ActiveRecord::Schema[7.1].define(version: 2024_05_13_095755) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@ -724,6 +724,7 @@ ActiveRecord::Schema[7.1].define(version: 2024_05_10_192043) do
t.bigint "from_account_id", null: false
t.string "type"
t.boolean "filtered", default: false, null: false
t.string "group_key"
t.index ["account_id", "id", "type"], name: "index_notifications_on_account_id_and_id_and_type", order: { id: :desc }
t.index ["account_id", "id", "type"], name: "index_notifications_on_filtered", order: { id: :desc }, where: "(filtered = false)"
t.index ["activity_id", "activity_type"], name: "index_notifications_on_activity_id_and_activity_type"