Перейти к содержанию
Версия: 4.2.159 Обновлено: 2026-04-29

Схема БД

Saga stores product state in PostgreSQL. The canonical schema is defined by migrations in backend/storage/migrations/.

Основные таблицы

  • users: user identity, status, email, balance-related user metadata.
  • wallets: deposit address records and provider metadata.
  • transactions: append-only ledger for financial operations.
  • transaction_requests: withdrawal and transfer request lifecycle.
  • investments: user investment positions and yield tracking.
  • sessions: backend JWT/session lifecycle.
  • fund_transfers: operator fund transfer tracking.
  • vault_snapshots: vault and provider balance snapshots.
  • audit_log: security and operational audit events.
  • analytics_events: product analytics events.

Операционные таблицы

  • schema_migrations: applied migration versions.
  • health_events, health_status, health_daily_stats: service health monitoring.
  • support_conversations, support_message_mappings: support bot conversation state.
  • gift_code_batches, gift_codes, gift_code_funding_orders, gift_code_funding_payments: gift code lifecycle.
  • user_groups, user_group_members, config_timeline: temporal configuration rollout.

Rules

  • transactions is append-only; operation status and reverse transactions represent state changes.
  • Financial API values use SafeDecimal rather than raw floating-point values.
  • Schema changes go through numbered migrations in backend/storage/migrations/.
  • Integration data stays provider-specific; business balances are calculated through canonical backend services.

Связанные документы