Don't expand bundles when adding cards. Leave the aggregation time fixed for now
This commit is contained in:
+6
@@ -0,0 +1,6 @@
|
||||
class RemoveUniqueConstraintFromNotificationBundlesUserId < ActiveRecord::Migration[8.1]
|
||||
def change
|
||||
remove_index :notification_bundles, :user_id, unique: true
|
||||
add_index :notification_bundles, %i[ ends_at status ]
|
||||
end
|
||||
end
|
||||
Generated
+2
-2
@@ -10,7 +10,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[8.1].define(version: 2025_08_26_084559) do
|
||||
ActiveRecord::Schema[8.1].define(version: 2025_08_26_131458) do
|
||||
create_table "accesses", force: :cascade do |t|
|
||||
t.datetime "accessed_at"
|
||||
t.integer "collection_id", null: false
|
||||
@@ -302,9 +302,9 @@ ActiveRecord::Schema[8.1].define(version: 2025_08_26_084559) do
|
||||
t.integer "status", default: 0, null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.integer "user_id", null: false
|
||||
t.index ["ends_at", "status"], name: "index_notification_bundles_on_ends_at_and_status"
|
||||
t.index ["user_id", "starts_at", "ends_at"], name: "idx_on_user_id_starts_at_ends_at_7eae5d3ac5"
|
||||
t.index ["user_id", "status"], name: "index_notification_bundles_on_user_id_and_status"
|
||||
t.index ["user_id"], name: "index_notification_bundles_on_user_id", unique: true
|
||||
end
|
||||
|
||||
create_table "notifications", force: :cascade do |t|
|
||||
|
||||
+5
-4
@@ -2352,10 +2352,11 @@ indexes:
|
||||
valid: true
|
||||
- !ruby/object:ActiveRecord::ConnectionAdapters::IndexDefinition
|
||||
table: notification_bundles
|
||||
name: index_notification_bundles_on_user_id
|
||||
unique: true
|
||||
name: index_notification_bundles_on_ends_at_and_status
|
||||
unique: false
|
||||
columns:
|
||||
- user_id
|
||||
- ends_at
|
||||
- status
|
||||
lengths: {}
|
||||
orders: {}
|
||||
opclasses: {}
|
||||
@@ -2860,4 +2861,4 @@ indexes:
|
||||
comment:
|
||||
valid: true
|
||||
workflows: []
|
||||
version: 20250826084559
|
||||
version: 20250826131458
|
||||
|
||||
Reference in New Issue
Block a user