Files
inbox-negotiator/supabase/migrations/20250607011000_add_approved_status.sql
Francisco Pessano 0c6f72761d Adds email approval & Postmark integration for negotiations
Enables users to approve and send negotiation emails directly via Postmark after configuring a server token in settings. Introduces new debt statuses ("approved", "sent"), UI for token management, and approval/rejection flows. Refactors notifications to use a modern toast library, adjusts dashboard status filters, and updates DB schema for new flows.

Empowers compliant, user-controlled negotiation and automated email delivery.
2025-06-07 18:48:07 -03:00

8 lines
261 B
SQL

-- Add 'approved' status to debts table
ALTER TABLE debts
DROP CONSTRAINT IF EXISTS debts_status_check;
ALTER TABLE debts
ADD CONSTRAINT debts_status_check
CHECK (status IN ('received', 'negotiating', 'approved', 'sent', 'settled', 'failed', 'opted_out'));