CREATE TABLE `sps_admin_login_history` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `login_time` timestamp NULL DEFAULT NULL,
  `logout_time` timestamp NULL DEFAULT NULL,
  `flag` int(11) NOT NULL DEFAULT '0',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

ALTER TABLE `sps_admin_login_history`
  ADD PRIMARY KEY (`id`);

ALTER TABLE `sps_admin_login_history`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;