CREATE TABLE hosts (
    id VARCHAR NOT NULL PRIMARY KEY,
    organization_id VARCHAR NOT NULL REFERENCES organizations(id),
    network_id VARCHAR NOT NULL REFERENCES networks(id),
    role_id VARCHAR NULL REFERENCES roles(id),
    name VARCHAR NOT NULL,
    ip_address VARCHAR NOT NULL,
    static_addresses text[] NOT NULL,
    listen_port int2 NOT NULL,
    is_lighthouse BOOLEAN NOT NULL,
    is_relay BOOLEAN NOT NULL,
    created_at TIMESTAMP NOT NULL,
    is_blocked BOOLEAN NOT NULL,

    last_seen_at TIMESTAMP NULL,
    client_version VARCHAR NULL,
    platform VARCHAR NULL,
    update_available BOOLEAN NULL,

    tags text[] NOT NULL,

    counter INT NULL
);