feat: Add meta to notification model (#8941)

* feat: Add meta and description to notification model

* chore: remove description
This commit is contained in:
Muhsin Keloth
2024-02-16 14:38:02 +05:30
committed by GitHub
parent 597a4164e8
commit 3b7b06dbec
3 changed files with 8 additions and 1 deletions

View File

@@ -4,6 +4,7 @@
#
# id :bigint not null, primary key
# last_activity_at :datetime
# meta :jsonb
# notification_type :integer not null
# primary_actor_type :string not null
# read_at :datetime

View File

@@ -0,0 +1,5 @@
class AddMetaToNotifications < ActiveRecord::Migration[7.0]
def change
add_column :notifications, :meta, :jsonb, default: {}
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.0].define(version: 2024_02_07_103014) do
ActiveRecord::Schema[7.0].define(version: 2024_02_15_065844) do
# These are extensions that must be enabled in order to support this database
enable_extension "pg_stat_statements"
enable_extension "pg_trgm"
@@ -750,6 +750,7 @@ ActiveRecord::Schema[7.0].define(version: 2024_02_07_103014) do
t.datetime "updated_at", null: false
t.datetime "snoozed_until"
t.datetime "last_activity_at", default: -> { "CURRENT_TIMESTAMP" }
t.jsonb "meta", default: {}
t.index ["account_id"], name: "index_notifications_on_account_id"
t.index ["last_activity_at"], name: "index_notifications_on_last_activity_at"
t.index ["primary_actor_type", "primary_actor_id"], name: "uniq_primary_actor_per_account_notifications"