Files
using.cash/openspec/changes
rick 40eefc6163
CI / docker (push) Has been cancelled
CI / build-and-test (push) Has started running
Add stored procedures, triggers, grants, and seed data (section 4)
Stored procedures organized by domain:
- 003-procedures-financial.sql: CreateFinancialTransaction (with gap-free
  OrganizationSequenceId), AddTransactionRow (with foreign currency),
  tag/dependency management, account CRUD, budgets, period closing
- 004-procedures-apar.sql: Expense claims (with VatCents, groups),
  inbound/outbound invoices (with sequence IDs, VAT), payouts, payments,
  payment groups, refunds, documents
- 005-procedures-support.sql: Users, RBAC (roles/permissions/assignments),
  organizations (VAT config, tax info), crypto (hot wallet addresses,
  UTXOs), exchange rates (micro-BTC scaling), mail queue, event queue,
  system settings

Security layer:
- 006-triggers.sql: INSERT/UPDATE/DELETE triggers on FinancialTransactionRows
  that reject operations where the transaction date falls in a closed
  fiscal period (defense-in-depth alongside application enforcement)
- 007-grants.sql: Three-tier MySQL users (uc_read SELECT, uc_write
  EXECUTE, uc_admin ALL)

Seed data:
- 008-seed.sql: Financial dependency types, BCH crypto chain, schema version

Combined initialization script:
- 000-initialize.sql: Runs all files in order

Made-with: Cursor
2026-04-08 16:28:33 +02:00
..