Merge branch 'main' into add-config-import-csv-skip-first-x-rows

Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
This commit is contained in:
Juan José Mata
2026-01-13 12:56:22 +01:00
committed by GitHub
269 changed files with 16974 additions and 831 deletions

66
db/schema.rb generated
View File

@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[7.2].define(version: 2026_01_10_142603) do
ActiveRecord::Schema[7.2].define(version: 2026_01_12_065106) do
# These are extensions that must be enabled in order to support this database
enable_extension "pgcrypto"
enable_extension "plpgsql"
@@ -49,6 +49,8 @@ ActiveRecord::Schema[7.2].define(version: 2026_01_10_142603) do
t.string "institution_name"
t.string "institution_domain"
t.text "notes"
t.jsonb "holdings_snapshot_data"
t.datetime "holdings_snapshot_at"
t.index ["accountable_id", "accountable_type"], name: "index_accounts_on_accountable_id_and_accountable_type"
t.index ["accountable_type"], name: "index_accounts_on_accountable_type"
t.index ["currency"], name: "index_accounts_on_currency"
@@ -472,6 +474,22 @@ ActiveRecord::Schema[7.2].define(version: 2026_01_10_142603) do
t.index ["merchant_id"], name: "index_family_merchant_associations_on_merchant_id"
end
create_table "flipper_features", force: :cascade do |t|
t.string "key", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["key"], name: "index_flipper_features_on_key", unique: true
end
create_table "flipper_gates", force: :cascade do |t|
t.string "feature_key", null: false
t.string "key", null: false
t.text "value"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["feature_key", "key", "value"], name: "index_flipper_gates_on_feature_key_and_key_and_value", unique: true
end
create_table "holdings", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
t.uuid "account_id", null: false
t.uuid "security_id", null: false
@@ -485,6 +503,8 @@ ActiveRecord::Schema[7.2].define(version: 2026_01_10_142603) do
t.string "external_id"
t.decimal "cost_basis", precision: 19, scale: 4
t.uuid "account_provider_id"
t.string "cost_basis_source"
t.boolean "cost_basis_locked", default: false, null: false
t.index ["account_id", "external_id"], name: "idx_holdings_on_account_id_external_id_unique", unique: true, where: "(external_id IS NOT NULL)"
t.index ["account_id", "security_id", "date", "currency"], name: "idx_on_account_id_security_id_date_currency_5323e39f8b", unique: true
t.index ["account_id"], name: "index_holdings_on_account_id"
@@ -795,6 +815,8 @@ ActiveRecord::Schema[7.2].define(version: 2026_01_10_142603) do
t.datetime "last_authenticated_at"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "issuer"
t.index ["issuer"], name: "index_oidc_identities_on_issuer"
t.index ["provider", "uid"], name: "index_oidc_identities_on_provider_and_uid", unique: true
t.index ["user_id"], name: "index_oidc_identities_on_user_id"
end
@@ -1050,6 +1072,38 @@ ActiveRecord::Schema[7.2].define(version: 2026_01_10_142603) do
t.index ["status"], name: "index_simplefin_items_on_status"
end
create_table "sso_audit_logs", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
t.uuid "user_id"
t.string "event_type", null: false
t.string "provider"
t.string "ip_address"
t.string "user_agent"
t.jsonb "metadata", default: {}, null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["created_at"], name: "index_sso_audit_logs_on_created_at"
t.index ["event_type"], name: "index_sso_audit_logs_on_event_type"
t.index ["user_id", "created_at"], name: "index_sso_audit_logs_on_user_id_and_created_at"
t.index ["user_id"], name: "index_sso_audit_logs_on_user_id"
end
create_table "sso_providers", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
t.string "strategy", null: false
t.string "name", null: false
t.string "label", null: false
t.string "icon"
t.boolean "enabled", default: true, null: false
t.string "issuer"
t.string "client_id"
t.string "client_secret"
t.string "redirect_uri"
t.jsonb "settings", default: {}, null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["enabled"], name: "index_sso_providers_on_enabled"
t.index ["name"], name: "index_sso_providers_on_name", unique: true
end
create_table "subscriptions", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
t.uuid "family_id", null: false
t.string "status", null: false
@@ -1126,7 +1180,14 @@ ActiveRecord::Schema[7.2].define(version: 2026_01_10_142603) do
t.string "currency"
t.jsonb "locked_attributes", default: {}
t.uuid "category_id"
t.decimal "realized_gain", precision: 19, scale: 4
t.decimal "cost_basis_amount", precision: 19, scale: 4
t.string "cost_basis_currency"
t.integer "holding_period_days"
t.string "realized_gain_confidence"
t.string "realized_gain_currency"
t.index ["category_id"], name: "index_trades_on_category_id"
t.index ["realized_gain"], name: "index_trades_on_realized_gain_not_null", where: "(realized_gain IS NOT NULL)"
t.index ["security_id"], name: "index_trades_on_security_id"
end
@@ -1139,9 +1200,11 @@ ActiveRecord::Schema[7.2].define(version: 2026_01_10_142603) do
t.string "kind", default: "standard", null: false
t.string "external_id"
t.jsonb "extra", default: {}, null: false
t.string "investment_activity_label"
t.index ["category_id"], name: "index_transactions_on_category_id"
t.index ["external_id"], name: "index_transactions_on_external_id"
t.index ["extra"], name: "index_transactions_on_extra", using: :gin
t.index ["investment_activity_label"], name: "index_transactions_on_investment_activity_label"
t.index ["kind"], name: "index_transactions_on_kind"
t.index ["merchant_id"], name: "index_transactions_on_merchant_id"
end
@@ -1275,6 +1338,7 @@ ActiveRecord::Schema[7.2].define(version: 2026_01_10_142603) do
add_foreign_key "sessions", "users"
add_foreign_key "simplefin_accounts", "simplefin_items"
add_foreign_key "simplefin_items", "families"
add_foreign_key "sso_audit_logs", "users"
add_foreign_key "subscriptions", "families"
add_foreign_key "syncs", "syncs", column: "parent_id"
add_foreign_key "taggings", "tags"