text: CREATE TABLE `friends` (
    `id` int(11) NOT NULL auto_increment,
    `user_id` int(11) NOT NULL,
    `friend_id` int(11) NOT NULL,
    `created` timestamp NOT NULL default CURRENT_TIMESTAMP,
    PRIMARY KEY  (`id`),
    KEY `user_id` (`user_id`),
    KEY `friend_id` (`friend_id`),
    CONSTRAINT `friends_friend_id` FOREIGN KEY (`friend_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
    CONSTRAINT `friends_user_id` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_swedish_ci;
  