
START TRANSACTION;







INSERT INTO `user_association` VALUES (2, 2);
INSERT INTO `user_association` VALUES (3, 2);
INSERT INTO `user_association` VALUES (4, 2);
INSERT INTO `user_association` VALUES (5, 1);
INSERT INTO `user_association` VALUES (6, 2);

INSERT INTO `user_information` (`user_id`, `first_name`, `last_name`) VALUES ('2' , 'first_name', 'last_name');
INSERT INTO `user_information` (`user_id`, `first_name`, `last_name`) VALUES ('3' , 'first_name', 'last_name');
INSERT INTO `user_information` (`user_id`, `first_name`, `last_name`) VALUES ('4' , 'first_name', 'last_name');
INSERT INTO `user_information` (`user_id`, `first_name`, `last_name`) VALUES ('5' , 'first_name', 'last_name');
INSERT INTO `user_information` (`user_id`, `first_name`, `last_name`) VALUES ('6' , 'first_name', 'last_name');

INSERT INTO `project` VALUES (1, 'project_test', 'logourl', 'false', 'false', '', '', '0', '0');
INSERT INTO `project` VALUES (2, 'project_other', 'logourl', 'false', 'false', '', '', '0', '0');

INSERT INTO `project_information` VALUES (1, 'short_desc1', 'desc1',  'prog1',  'os1',  'license1', 'category1');
INSERT INTO `project_information` VALUES (2, 'short_desc2', 'desc2',  'prog2',  'os2',  'license2', 'category2');

INSERT INTO `user_project_association` VALUES (1, 4, 2);# user_test is only a project member of project_test
INSERT INTO `user_project_association` VALUES (1, 3, 4);# user_owner is the owner of project_test

INSERT INTO `community` (`community_id`, `name`, `description`, `logo`) VALUES (1, 'community_test', 'This is a description for the test community.', 'no');

INSERT INTO `community_wiki` (`wiki_id`, `community_id`, `title`, `private`) VALUES (1, 1, 'Public', 'false');
INSERT INTO `community_wiki` (`wiki_id`, `community_id`, `title`, `private`) VALUES (2, 1, 'Private', 'true');
INSERT INTO `community_wiki_revision` (`wiki_revision_id`, `wiki_id`, `community_wiki_revision`, `creation_time`, `user_id`, `title`, `text`) VALUES
(1, 1, 1, UNIX_TIMESTAMP(), 1, 'Title One', 'Text for wiki page one.'),
(2, 1, 2, UNIX_TIMESTAMP(), 6, 'Title One', 'Text for wiki page one. Revised.'),
(3, 2, 1, UNIX_TIMESTAMP(), 6, 'Title Two', 'Text for wiki page two.');

INSERT INTO `user_community_association` (`community_id`, `group_id`, `user_id`) VALUES (1, 7, 2);# user_test is just a member
INSERT INTO `user_community_association` (`community_id`, `group_id`, `user_id`) VALUES (1, 6, 6);# user_admin is an admin

INSERT INTO `project_community_association` (`community_id`, `project_id`) VALUES (1, 1);# project_test <=> community_test

# Add a test release to project_other
INSERT INTO `release` VALUES (1, 2, 12345, 'some release', 'test release', '32');
INSERT INTO `release_file` VALUES (1, 1, 'test.exe', 'win32');

# Just some workitems
INSERT INTO `workitem` VALUES (2, 2, 1186255528, 1, 2);
INSERT INTO `workitem` VALUES (3, 3, 1186255560, 1, 2);
INSERT INTO `workitem` VALUES (4, 4, 1186255560, 1, 2);
INSERT INTO `workitem` VALUES (5, 5, 1186255580, 1, 2);
INSERT INTO `workitem` VALUES (6, 4, 1186255525, 1, 5);

INSERT INTO `workitem_release` VALUES (2, 1);
INSERT INTO `workitem_commit` VALUES (3, 33, 'some commit log', 'some diff');
INSERT INTO `workitem_wiki` VALUES (4, 'Some wikiworkitem', 'some diff', 12, 11, 0);
INSERT INTO `workitem_blog` VALUES (5, 'some Blog title', 'blog diff', 22, 21);

# Test application for key login test
INSERT INTO `application` VALUES (1, 'Test Application', 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', 0);

INSERT INTO `issue` VALUES (1, 1, 1, "issue_project_test", 0, 0);
INSERT INTO `issue` VALUES (2, 1, 2, "issue_project_other", 0, 0);
INSERT INTO `issue` VALUES (3, 2, 1, "issue_project_test_2", 0, 0);
INSERT INTO `issue` VALUES (4, 1, 3, "Title Issue Three for Project 1", 0, 0);

INSERT INTO `issue_revision` VALUES (1, 1, UNIX_TIMESTAMP(), 4, "issue 1");
INSERT INTO `issue_revision` VALUES (2, 2, UNIX_TIMESTAMP(), 4, "issue 2");
INSERT INTO `issue_revision` VALUES (3, 2, UNIX_TIMESTAMP(), 2, "issue 2 reply");
INSERT INTO `issue_revision` VALUES (4, 4, UNIX_TIMESTAMP(), 4, "issue 3");
INSERT INTO `issue_revision` VALUES (5, 3, UNIX_TIMESTAMP(), 4, "issue 1 project 2");

INSERT INTO `tag_text` VALUES (1, "status::open");

INSERT INTO `issue_tag_association` VALUES (1, 1);
INSERT INTO `issue_tag_association` VALUES (2, 1);
INSERT INTO `issue_tag_association` VALUES (3, 1);
INSERT INTO `issue_tag_association` VALUES (4, 1);
INSERT INTO `issue_tag_association` VALUES (5, 1);

INSERT INTO `issue_attachment` VALUES (1, 1, 'attached_file.zip', 'My first attachment');


COMMIT;

