1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-19 05:09:38 +02:00

Merge branch 'main' of github.com:maybe-finance/maybe into zachgoll/maybe-902-add-anchor-fields-to-valuation

This commit is contained in:
Zach Gollwitzer 2025-07-10 11:04:02 -04:00
commit 33a32ed994
3 changed files with 29 additions and 14 deletions

View file

@ -192,9 +192,9 @@ 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 (2.13.2)
faraday-net_http (>= 2.0, < 3.5)
json
logger
@ -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)
@ -448,13 +448,13 @@ 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)
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)
@ -522,16 +522,16 @@ 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)
sidekiq (8.0.5)
connection_pool (>= 2.5.0)
json (>= 2.9.0)
logger (>= 1.6.2)
@ -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)

View file

@ -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

10
db/schema.rb generated
View file

@ -29,7 +29,7 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_07_130134) 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_07_130134) 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_07_130134) 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_07_130134) 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_07_130134) 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