From a63d36d10cdb3d437a9d49b86ce7075b267c2cab Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Jul 2025 16:22:01 -0400 Subject: [PATCH 1/8] Bump sentry-rails from 5.25.0 to 5.26.0 (#2447) --- updated-dependencies: - dependency-name: sentry-rails dependency-version: 5.26.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Gemfile.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 17a14534..85dc1c9e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -448,7 +448,7 @@ GEM ffi (~> 1.0) rbs (3.9.4) logger - rdoc (6.14.1) + rdoc (6.14.2) erb psych (>= 4.0.0) redcarpet (3.6.1) @@ -522,14 +522,14 @@ GEM rexml (~> 3.2, >= 3.2.5) rubyzip (>= 1.2.2, < 3.0) websocket (~> 1.0) - sentry-rails (5.25.0) + sentry-rails (5.26.0) railties (>= 5.0) - sentry-ruby (~> 5.25.0) - sentry-ruby (5.25.0) + sentry-ruby (~> 5.26.0) + sentry-ruby (5.26.0) bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) - sentry-sidekiq (5.25.0) - sentry-ruby (~> 5.25.0) + sentry-sidekiq (5.26.0) + sentry-ruby (~> 5.26.0) sidekiq (>= 3.0) sidekiq (8.0.4) connection_pool (>= 2.5.0) From f9b131a5dbd96291da61e3f4cdc2e6626b0e2713 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Jul 2025 16:22:10 -0400 Subject: [PATCH 2/8] Bump faker from 3.5.1 to 3.5.2 (#2448) --- updated-dependencies: - dependency-name: faker dependency-version: 3.5.2 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 85dc1c9e..0799eef7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -192,7 +192,7 @@ GEM et-orbi (1.2.11) tzinfo event_stream_parser (1.0.0) - faker (3.5.1) + faker (3.5.2) i18n (>= 1.8.11, < 2) faraday (2.13.1) faraday-net_http (>= 2.0, < 3.5) From aaf24e1309b1de5a302fa837892462c5ba2ea3cb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Jul 2025 16:25:31 -0400 Subject: [PATCH 3/8] Bump stripe from 15.2.1 to 15.3.0 (#2445) --- updated-dependencies: - dependency-name: stripe dependency-version: 15.3.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 0799eef7..a6276432 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -556,7 +556,7 @@ GEM stimulus-rails (1.3.4) railties (>= 6.0.0) stringio (3.1.7) - stripe (15.2.1) + stripe (15.3.0) tailwindcss-rails (4.2.3) railties (>= 7.0.0) tailwindcss-ruby (~> 4.0) From d77c683d59144e78185ccc12bbb19f0386afe87f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Jul 2025 16:28:24 -0400 Subject: [PATCH 4/8] Bump faraday from 2.13.1 to 2.13.2 (#2442) --- updated-dependencies: - dependency-name: faraday dependency-version: 2.13.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index a6276432..5e1ae3f7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -194,7 +194,7 @@ GEM event_stream_parser (1.0.0) faker (3.5.2) i18n (>= 1.8.11, < 2) - faraday (2.13.1) + faraday (2.13.2) faraday-net_http (>= 2.0, < 3.5) json logger From e7043328e4fab0781a521e31fc218c80cb0d7e5d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Jul 2025 16:39:19 -0400 Subject: [PATCH 5/8] Bump pagy from 9.3.4 to 9.3.5 (#2444) --- updated-dependencies: - dependency-name: pagy dependency-version: 9.3.5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 5e1ae3f7..41ca8fb2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -365,7 +365,7 @@ GEM faraday (>= 1, < 3) sawyer (~> 0.9) ostruct (0.6.2) - pagy (9.3.4) + pagy (9.3.5) parallel (1.27.0) parser (3.3.8.0) ast (~> 2.4.1) From e848db2aa18d44ef3c56beb7c38f4504a96c7db1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Jul 2025 16:39:36 -0400 Subject: [PATCH 6/8] Bump sidekiq from 8.0.4 to 8.0.5 (#2441) --- updated-dependencies: - dependency-name: sidekiq dependency-version: 8.0.5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 41ca8fb2..89cac3d3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -454,7 +454,7 @@ GEM redcarpet (3.6.1) redis (5.4.0) redis-client (>= 0.22.0) - redis-client (0.24.0) + redis-client (0.25.0) connection_pool regexp_parser (2.10.0) reline (0.6.1) @@ -531,7 +531,7 @@ GEM sentry-sidekiq (5.26.0) sentry-ruby (~> 5.26.0) sidekiq (>= 3.0) - sidekiq (8.0.4) + sidekiq (8.0.5) connection_pool (>= 2.5.0) json (>= 2.9.0) logger (>= 1.6.2) From 8d0c1c5a5697dd812218284e159cb1a6db0df9be Mon Sep 17 00:00:00 2001 From: Josh Pigford Date: Wed, 9 Jul 2025 09:20:56 -0500 Subject: [PATCH 7/8] Update database schema: increment version to 2025_07_02_173231, modify virtual column definition for classification, and add new indexes for entries and exchange rates. --- ...702173231_fix_mobile_devices_unique_constraint.rb | 9 +++++++++ db/schema.rb | 12 +++++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 db/migrate/20250702173231_fix_mobile_devices_unique_constraint.rb diff --git a/db/migrate/20250702173231_fix_mobile_devices_unique_constraint.rb b/db/migrate/20250702173231_fix_mobile_devices_unique_constraint.rb new file mode 100644 index 00000000..f45a6484 --- /dev/null +++ b/db/migrate/20250702173231_fix_mobile_devices_unique_constraint.rb @@ -0,0 +1,9 @@ +class FixMobileDevicesUniqueConstraint < ActiveRecord::Migration[7.2] + def change + # Remove the old unique index on device_id only + remove_index :mobile_devices, :device_id, if_exists: true + + # The composite unique index on user_id and device_id already exists + # This allows the same device_id to be used by different users + end +end \ No newline at end of file diff --git a/db/schema.rb b/db/schema.rb index f1bc9daf..2a9b0ad6 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.2].define(version: 2025_07_01_161640) do +ActiveRecord::Schema[7.2].define(version: 2025_07_02_173231) do # These are extensions that must be enabled in order to support this database enable_extension "pgcrypto" enable_extension "plpgsql" @@ -29,7 +29,7 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_01_161640) do t.uuid "accountable_id" t.decimal "balance", precision: 19, scale: 4 t.string "currency" - t.virtual "classification", type: :string, as: "\nCASE\n WHEN ((accountable_type)::text = ANY ((ARRAY['Loan'::character varying, 'CreditCard'::character varying, 'OtherLiability'::character varying])::text[])) THEN 'liability'::text\n ELSE 'asset'::text\nEND", stored: true + t.virtual "classification", type: :string, as: "\nCASE\n WHEN ((accountable_type)::text = ANY (ARRAY[('Loan'::character varying)::text, ('CreditCard'::character varying)::text, ('OtherLiability'::character varying)::text])) THEN 'liability'::text\n ELSE 'asset'::text\nEND", stored: true t.uuid "import_id" t.uuid "plaid_account_id" t.decimal "cash_balance", precision: 19, scale: 4, default: "0.0" @@ -215,7 +215,12 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_01_161640) do t.boolean "excluded", default: false t.string "plaid_id" t.jsonb "locked_attributes", default: {} + t.index ["account_id", "date"], name: "index_entries_on_account_id_and_date" t.index ["account_id"], name: "index_entries_on_account_id" + t.index ["amount"], name: "index_entries_on_amount" + t.index ["date"], name: "index_entries_on_date" + t.index ["entryable_id", "entryable_type"], name: "index_entries_on_entryable" + t.index ["excluded"], name: "index_entries_on_excluded" t.index ["import_id"], name: "index_entries_on_import_id" end @@ -226,6 +231,7 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_01_161640) do t.date "date", null: false t.datetime "created_at", null: false t.datetime "updated_at", null: false + t.index ["date", "from_currency", "to_currency"], name: "index_exchange_rates_on_date_and_currencies" t.index ["from_currency", "to_currency", "date"], name: "index_exchange_rates_on_base_converted_date_unique", unique: true t.index ["from_currency"], name: "index_exchange_rates_on_from_currency" t.index ["to_currency"], name: "index_exchange_rates_on_to_currency" @@ -435,7 +441,6 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_01_161640) do t.datetime "created_at", null: false t.datetime "updated_at", null: false t.integer "oauth_application_id" - t.index ["device_id"], name: "index_mobile_devices_on_device_id", unique: true t.index ["oauth_application_id"], name: "index_mobile_devices_on_oauth_application_id" t.index ["user_id", "device_id"], name: "index_mobile_devices_on_user_id_and_device_id", unique: true t.index ["user_id"], name: "index_mobile_devices_on_user_id" @@ -684,6 +689,7 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_01_161640) do t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["tag_id"], name: "index_taggings_on_tag_id" + t.index ["taggable_id", "taggable_type"], name: "index_taggings_on_taggable_id_and_type" t.index ["taggable_type", "taggable_id"], name: "index_taggings_on_taggable" end From a91441bcc8b8b416e2c36e57b853365be661d610 Mon Sep 17 00:00:00 2001 From: Josh Pigford Date: Wed, 9 Jul 2025 09:22:51 -0500 Subject: [PATCH 8/8] Remove old unique index on device_id in mobile_devices migration to allow multiple users to share the same device. --- .../20250702173231_fix_mobile_devices_unique_constraint.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/migrate/20250702173231_fix_mobile_devices_unique_constraint.rb b/db/migrate/20250702173231_fix_mobile_devices_unique_constraint.rb index f45a6484..6ef8539e 100644 --- a/db/migrate/20250702173231_fix_mobile_devices_unique_constraint.rb +++ b/db/migrate/20250702173231_fix_mobile_devices_unique_constraint.rb @@ -2,8 +2,8 @@ class FixMobileDevicesUniqueConstraint < ActiveRecord::Migration[7.2] def change # Remove the old unique index on device_id only remove_index :mobile_devices, :device_id, if_exists: true - + # The composite unique index on user_id and device_id already exists # This allows the same device_id to be used by different users end -end \ No newline at end of file +end