CREATE TABLE `auth_log` (
                            `id` int NOT NULL,
                            `id_user` mediumint NOT NULL,
                            `entry` datetime NOT NULL,
                            `ip` varchar(255) NOT NULL,
                            `user_agent` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

ALTER TABLE `auth_log`
    ADD PRIMARY KEY (`id`),
  ADD KEY `id_user` (`id_user`);

ALTER TABLE `auth_log`
    MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;