From 2c87c2fb155cc5b451ca9867219b6cdc788738b8 Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Tue, 18 Mar 2025 09:14:16 -0400 Subject: [PATCH] Update schema files and fix some trivial test failures. --- db/schema.rb | 1 + db/schema_cache.yml | 17 +++++++++++++++++ test/models/filter_test.rb | 4 ++-- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/db/schema.rb b/db/schema.rb index 1d1777973..6a65a7709 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -220,6 +220,7 @@ ActiveRecord::Schema[8.1].define(version: 2025_03_18_005138) do t.datetime "created_at", null: false t.datetime "updated_at", null: false t.integer "user_id", null: false + t.index ["bubble_id", "user_id"], name: "index_pins_on_bubble_id_and_user_id", unique: true t.index ["bubble_id"], name: "index_pins_on_bubble_id" t.index ["user_id"], name: "index_pins_on_user_id" end diff --git a/db/schema_cache.yml b/db/schema_cache.yml index 745d2b914..f0550d59e 100644 --- a/db/schema_cache.yml +++ b/db/schema_cache.yml @@ -1710,6 +1710,23 @@ indexes: comment: valid: true pins: + - !ruby/object:ActiveRecord::ConnectionAdapters::IndexDefinition + table: pins + name: index_pins_on_bubble_id_and_user_id + unique: true + columns: + - bubble_id + - user_id + lengths: {} + orders: {} + opclasses: {} + where: + type: + using: + include: + nulls_not_distinct: + comment: + valid: true - !ruby/object:ActiveRecord::ConnectionAdapters::IndexDefinition table: pins name: index_pins_on_user_id diff --git a/test/models/filter_test.rb b/test/models/filter_test.rb index cb1474bfc..435b2bb35 100644 --- a/test/models/filter_test.rb +++ b/test/models/filter_test.rb @@ -20,7 +20,7 @@ class FilterTest < ActiveSupport::TestCase assert_equal [ bubbles(:layout) ], filter.bubbles filter = users(:david).filters.new stage_ids: [ workflow_stages(:qa_maybe).id ] - assert_equal [ bubbles(:logo) ], filter.bubbles + assert_equal [ bubbles(:logo), @new_bubble ], filter.bubbles filter = users(:david).filters.new assignment_status: "unassigned", bucket_ids: [ @new_bucket.id ] assert_equal [ @new_bubble ], filter.bubbles @@ -106,7 +106,7 @@ class FilterTest < ActiveSupport::TestCase assert_equal "Most discussed, tagged #Mobile, and assigned to JZ ", filters(:jz_assignments).summary filters(:jz_assignments).update!(stages: workflow_stages(:qa_maybe, :qa_not_now)) - assert_equal "Most discussed, tagged #Mobile, assigned to JZ, and staged in Triage or In Progress ", filters(:jz_assignments).summary + assert_equal "Most discussed, tagged #Mobile, assigned to JZ, and staged in Maybe? or Not now ", filters(:jz_assignments).summary filters(:jz_assignments).update!(stages: [], assignees: [], tags: [], buckets: [ buckets(:writebook) ]) assert_equal "Most discussed in Writebook", filters(:jz_assignments).summary