+/- table definition

Query

CREATE TABLE agent_notifications  (
  id INTEGER PRIMARY KEY AUTOINCREMENT,
  agent_id INTEGER NOT NULL,
  notification_type TEXT NOT NULL CHECK (notification_type IN ('voucher_sold', 'payment_received', 'balance_updated', 'request_approved', 'request_rejected', 'registration_success', 'registration_approved', 'registration_rejected')),
  title TEXT NOT NULL,
  message TEXT NOT NULL,
  is_read INTEGER DEFAULT 0,
  created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
  FOREIGN KEY (agent_id) REFERENCES agents(id) ON DELETE CASCADE
)
Use Shift + Up/Down to navigate recently-executed queries