# Table: `host_sources`

Stores evidence/source labels for a host.

## Columns

| Column | Type | Null | Default | Notes |
|--------|------|------|---------|-------|
| `host_fqdn` | `TEXT` | no | none | Target host. References `hosts(fqdn)`. |
| `source` | `TEXT` | no | none | Source label, for example `local-hosts.tsv` or `madagascar.json`. |
| `status` | `TEXT` | no | `'active'` | Source lifecycle state. |
| `created_at` | `TEXT` | no | none | ISO UTC creation timestamp. |
| `retired_at` | `TEXT` | yes | `NULL` | ISO UTC retirement timestamp. |

## Keys And Indexes

- Primary key: `(host_fqdn, source)`

## Relationships

- `host_fqdn` references `hosts(fqdn)` with `ON UPDATE CASCADE ON DELETE RESTRICT`

## Definition

```sql
CREATE TABLE IF NOT EXISTS host_sources (
    host_fqdn TEXT NOT NULL,
    source TEXT NOT NULL,
    status TEXT NOT NULL DEFAULT 'active',
    created_at TEXT NOT NULL,
    retired_at TEXT,
    PRIMARY KEY (host_fqdn, source),
    FOREIGN KEY (host_fqdn) REFERENCES hosts(fqdn) ON UPDATE CASCADE ON DELETE RESTRICT
);
```
