feat: Add meta to notification model (#8941)
* feat: Add meta and description to notification model * chore: remove description
This commit is contained in:
@@ -4,6 +4,7 @@
|
|||||||
#
|
#
|
||||||
# id :bigint not null, primary key
|
# id :bigint not null, primary key
|
||||||
# last_activity_at :datetime
|
# last_activity_at :datetime
|
||||||
|
# meta :jsonb
|
||||||
# notification_type :integer not null
|
# notification_type :integer not null
|
||||||
# primary_actor_type :string not null
|
# primary_actor_type :string not null
|
||||||
# read_at :datetime
|
# read_at :datetime
|
||||||
|
|||||||
5
db/migrate/20240215065844_add_meta_to_notifications.rb
Normal file
5
db/migrate/20240215065844_add_meta_to_notifications.rb
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
class AddMetaToNotifications < ActiveRecord::Migration[7.0]
|
||||||
|
def change
|
||||||
|
add_column :notifications, :meta, :jsonb, default: {}
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# 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
|
# These are extensions that must be enabled in order to support this database
|
||||||
enable_extension "pg_stat_statements"
|
enable_extension "pg_stat_statements"
|
||||||
enable_extension "pg_trgm"
|
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 "updated_at", null: false
|
||||||
t.datetime "snoozed_until"
|
t.datetime "snoozed_until"
|
||||||
t.datetime "last_activity_at", default: -> { "CURRENT_TIMESTAMP" }
|
t.datetime "last_activity_at", default: -> { "CURRENT_TIMESTAMP" }
|
||||||
|
t.jsonb "meta", default: {}
|
||||||
t.index ["account_id"], name: "index_notifications_on_account_id"
|
t.index ["account_id"], name: "index_notifications_on_account_id"
|
||||||
t.index ["last_activity_at"], name: "index_notifications_on_last_activity_at"
|
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"
|
t.index ["primary_actor_type", "primary_actor_id"], name: "uniq_primary_actor_per_account_notifications"
|
||||||
|
|||||||
Reference in New Issue
Block a user