CREATE TABLE `actions` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `action` varchar(30) NOT NULL,
  `user` bigint(20) NOT NULL,
  `related_user` bigint(20) NOT NULL,
  `type` varchar(30) NOT NULL,
  `obj_id` bigint(20) NOT NULL,
  `related_obj_id` bigint(20) NOT NULL,
  `user_id` bigint(20) NOT NULL,
  `collection_id` bigint(20) NOT NULL,
  `date` datetime NOT NULL,
  `seen` varchar(1) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `related_user` (`related_user`,`date`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1