CREATE TABLE `user_comments` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `id_company` int(10) unsigned NOT NULL,
  `id_user` int(10) unsigned NOT NULL,
  `comments` varchar(255) NOT NULL,
  `status` tinyint(1) unsigned DEFAULT '0' COMMENT '0 - new\n1 - approved\n2 - declined',
  PRIMARY KEY (`id`),
  KEY `fk_user_comments_companies_idx` (`id_company`),
  KEY `fk_user_comments_users_idx` (`id_user`),
  CONSTRAINT `fk_user_comments_companies` FOREIGN KEY (`id_company`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `fk_user_comments_users` FOREIGN KEY (`id_user`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;