-- Jetons d'authentification pour l'application desktop StudioDesk (login par token).
CREATE TABLE IF NOT EXISTS client_tokens (
    id int(11) NOT NULL AUTO_INCREMENT,
    user_id int(11) NOT NULL,
    token char(64) NOT NULL,
    label varchar(190) NULL,
    user_agent text NULL,
    created_at datetime NOT NULL,
    last_seen_at datetime NULL,
    PRIMARY KEY (id),
    UNIQUE KEY uniq_client_tokens_token (token),
    KEY idx_client_tokens_user (user_id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
