# Table: `tags`

Catalog for host tags managed in the UI.

## Columns

| Column | Type | Null | Default | Notes |
|--------|------|------|---------|-------|
| `tag_id` | `TEXT` | no | none | Stable tag identifier derived from the label. Primary key. |
| `label` | `TEXT` | no | none | Display label. Unique. |
| `color` | `TEXT` | no | `'#647084'` | UI color, stored as `#rrggbb`. |
| `icon` | `TEXT` | no | `'tag'` | UI icon key. |
| `notes` | `TEXT` | no | `''` | Operator notes. |
| `created_at` | `TEXT` | no | none | ISO UTC creation timestamp. |
| `updated_at` | `TEXT` | no | none | ISO UTC update timestamp. |

## Keys And Indexes

- Primary key: `tag_id`
- Unique key: `label`

## Relationships

Referenced by:

- `host_tags.tag_id`

## Definition

```sql
CREATE TABLE IF NOT EXISTS tags (
    tag_id TEXT PRIMARY KEY,
    label TEXT NOT NULL UNIQUE,
    color TEXT NOT NULL DEFAULT '#647084',
    icon TEXT NOT NULL DEFAULT 'tag',
    notes TEXT NOT NULL DEFAULT '',
    created_at TEXT NOT NULL,
    updated_at TEXT NOT NULL
);
```
