20251021000000_pending_quotes_optimization.sql 359 B

1234567
  1. -- Add created_time column to mint_quote table for ordering queries
  2. ALTER TABLE mint_quote ADD COLUMN created_time INTEGER NOT NULL DEFAULT 0;
  3. -- Composite index for optimized pending quotes query
  4. -- Supports WHERE amount_issued = 0 OR payment_method = 'bolt12'
  5. CREATE INDEX IF NOT EXISTS idx_mint_quote_pending
  6. ON mint_quote(payment_method, amount_issued);