feat: resolve and persist actual order venue

This commit is contained in:
jordan
2026-07-29 17:10:32 +09:00
parent 6398ff250c
commit a656350a35
18 changed files with 304 additions and 47 deletions
@@ -0,0 +1,20 @@
-- dcy-041 / GitHub #44: AUTO may exist while an intent is pending, but the
-- actual submitted KRX/NXT value replaces it atomically with broker_order_id.
ALTER TABLE daily_slot
DROP CONSTRAINT IF EXISTS daily_slot_venue_check;
ALTER TABLE daily_slot
ADD CONSTRAINT daily_slot_venue_check
CHECK (venue IN ('AUTO', 'KRX', 'NXT', 'SOR'));
-- Core keeps the actual venue in its durable ledger outbox. Portfolio Hub's
-- HTTP schema is intentionally unchanged in this migration.
ALTER TABLE ledger_outbox
ADD COLUMN IF NOT EXISTS venue TEXT NOT NULL DEFAULT 'KRX';
ALTER TABLE ledger_outbox
DROP CONSTRAINT IF EXISTS ledger_outbox_venue_check;
ALTER TABLE ledger_outbox
ADD CONSTRAINT ledger_outbox_venue_check
CHECK (venue IN ('AUTO', 'KRX', 'NXT', 'SOR'));