Files
openccb/services/cms-service/migrations/20260414000002_organization_email_settings.sql
Nurfog e1d5975e57 feat: add email settings management
- Introduced EmailSettings component for managing SMTP services.
- Added API endpoints for organization email services including CRUD operations.
- Created database migrations for organization_email_settings and organization_email_services tables.
- Updated the settings page to include EmailSettings component.
- Implemented validation and error handling for email service operations.
2026-04-15 09:33:50 -04:00

15 lines
583 B
SQL

CREATE TABLE IF NOT EXISTS organization_email_settings (
organization_id UUID PRIMARY KEY REFERENCES organizations(id) ON DELETE CASCADE,
smtp_enabled BOOLEAN NOT NULL DEFAULT FALSE,
smtp_host TEXT,
smtp_port INTEGER NOT NULL DEFAULT 587,
smtp_from TEXT,
smtp_username TEXT,
smtp_password TEXT,
smtp_starttls BOOLEAN NOT NULL DEFAULT TRUE,
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
);
CREATE INDEX IF NOT EXISTS idx_org_email_settings_org_id ON organization_email_settings(organization_id);