
CREATE TABLE `member_oauth_token` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `fk_member` int(11) unsigned DEFAULT NULL,
  `token_id` char(80) NOT NULL,
  `created` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `last_used` timestamp NOT NULL DEFAULT current_timestamp(),
  `expire_date` timestamp NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`),
  KEY `token_id` (`token_id`),
  KEY `fk_member` (`fk_member`),
  KEY `expire_date` (`expire_date`),
  KEY `last_used` (`last_used`),
  CONSTRAINT `member_oauth_token_member` FOREIGN KEY (`fk_member`) REFERENCES `member` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
