# Table: `certificate_dns_names`

Stores DNS Subject Alternative Names for certificates.

## Columns

| Column | Type | Null | Default | Notes |
|--------|------|------|---------|-------|
| `certificate_id` | `TEXT` | no | none | Certificate identifier. References `certificates(certificate_id)`. |
| `dns_name` | `TEXT` | no | none | DNS SAN value. |

## Keys And Indexes

- Primary key: `(certificate_id, dns_name)`
- Lookup index: `idx_certificate_dns_names_dns_name` on `dns_name`

## Relationships

- `certificate_id` references `certificates(certificate_id)` with `ON UPDATE CASCADE ON DELETE CASCADE`

## Definition

```sql
CREATE TABLE IF NOT EXISTS certificate_dns_names (
    certificate_id TEXT NOT NULL,
    dns_name TEXT NOT NULL,
    PRIMARY KEY (certificate_id, dns_name),
    FOREIGN KEY (certificate_id) REFERENCES certificates(certificate_id) ON UPDATE CASCADE ON DELETE CASCADE
);

CREATE INDEX IF NOT EXISTS idx_certificate_dns_names_dns_name
ON certificate_dns_names(dns_name);
```
