Merge pull request #2527 from basecamp/pre-notification-stacking-migrations

Add card_id and unread_count to notifications
This commit is contained in:
Stanko Krtalić
2026-02-12 08:10:56 +01:00
committed by GitHub
3 changed files with 10 additions and 0 deletions
@@ -0,0 +1,6 @@
class AddCardIdToNotifications < ActiveRecord::Migration[8.2]
def change
add_column :notifications, :card_id, :uuid
add_column :notifications, :unread_count, :integer, null: false, default: 0
end
end
Generated
+2
View File
@@ -385,11 +385,13 @@ ActiveRecord::Schema[8.2].define(version: 2026_02_11_122517) do
create_table "notifications", id: :uuid, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.uuid "account_id", null: false
t.uuid "card_id"
t.datetime "created_at", null: false
t.uuid "creator_id"
t.datetime "read_at"
t.uuid "source_id", null: false
t.string "source_type", null: false
t.integer "unread_count", default: 0, null: false
t.datetime "updated_at", null: false
t.uuid "user_id", null: false
t.index ["account_id"], name: "index_notifications_on_account_id"
+2
View File
@@ -385,11 +385,13 @@ ActiveRecord::Schema[8.2].define(version: 2026_02_11_122517) do
create_table "notifications", id: :uuid, force: :cascade do |t|
t.uuid "account_id", null: false
t.uuid "card_id"
t.datetime "created_at", null: false
t.uuid "creator_id"
t.datetime "read_at"
t.uuid "source_id", null: false
t.string "source_type", limit: 255, null: false
t.integer "unread_count", default: 0, null: false
t.datetime "updated_at", null: false
t.uuid "user_id", null: false
t.index ["account_id"], name: "index_notifications_on_account_id"