set foreign_key_checks = 0;

ALTER TABLE `csm_application` DISABLE KEYS ;
ALTER TABLE `csm_group` DISABLE KEYS ;
ALTER TABLE `csm_pg_pe` DISABLE KEYS ;
ALTER TABLE `csm_privilege` DISABLE KEYS ;
ALTER TABLE `csm_protection_element` DISABLE KEYS ;
ALTER TABLE `csm_protection_group` DISABLE KEYS ;
ALTER TABLE `csm_role` DISABLE KEYS ;
ALTER TABLE `csm_role_privilege` DISABLE KEYS ;
ALTER TABLE `csm_user` DISABLE KEYS ;
ALTER TABLE `csm_user_group` DISABLE KEYS ;
ALTER TABLE `csm_user_group_role_pg` DISABLE KEYS ;
ALTER TABLE `csm_user_pe` DISABLE KEYS ;

INSERT INTO `csm_application` VALUES 
('2','cagwas','Common caIntegrator App.',0,0,'2007-07-15 00:00:00',NULL,NULL,NULL,NULL,NULL),
('4','csmupt','UPT Super Admin Application',0,0,'2007-07-09 16:33:36',NULL,NULL,NULL,NULL,NULL);
INSERT INTO `csm_group` VALUES 
('18','CAGWAS_GROUP',NULL,'2007-11-19 00:00:00','2');
INSERT INTO `csm_pg_pe` VALUES 
('45','13','32','2007-11-19 10:19:21'),
('46','13','31','2007-11-19 10:19:21'),
('47','13','30','2007-11-19 10:19:21'),
('48','13','20','2007-11-19 10:19:21'),
('49','13','34','2007-11-19 10:19:21'),
('50','13','33','2007-11-19 10:19:21');
INSERT INTO `csm_privilege` VALUES 
('1','CREATE','This privilege grants permission to a user to create an entity. This entity can be an object, a database entry, or a resource such as a network connection','2005-11-11 12:01:22'),
('2','ACCESS','This privilege allows a user to access a particular resource.  Examples of resources include a network or database connection, socket, module of the application, or even the application itself','2005-11-11 12:01:22'),
('3','READ','This privilege permits the user to read data from a file, URL, database, an object, etc. This can be used at an entity level signifying that the user is allowed to read data about a particular entry','2005-11-11 12:01:22'),
('4','WRITE','This privilege allows a user to write data to a file, URL, database, an object, etc. This can be used at an entity level signifying that the user is allowed to write data about a particular entity','2005-11-11 12:01:22'),
('5','UPDATE','This privilege grants permission at an entity level and signifies that the user is allowed to update data for a particular entity. Entities may include an object, object attribute, database row etc','2005-11-11 12:01:22'),
('6','DELETE','This privilege permits a user to delete a logical entity. This entity can be an object, a database entry, a resource such as a network connection, etc','2005-11-11 12:01:22'),
('7','EXECUTE','This privilege allows a user to execute a particular resource. The resource can be a method, function, behavior of the application, URL, button etc','2005-11-11 12:01:22');
INSERT INTO `csm_protection_element` VALUES 
('20','cagwas_study1',NULL,'1',NULL,NULL,'2','2007-11-14 00:00:00'),
('23','csmupt','UPT Super Admin Application','csmupt',NULL,NULL,'4','2007-07-09 16:36:18'),
('25','cagwas','cagwas','cagwas',NULL,NULL,'4','2007-07-15 00:00:00'),
('30','cagwas_study2',NULL,'2',NULL,NULL,'2','2007-11-14 00:00:00'),
('31','cagwas_study3',NULL,'3',NULL,NULL,'2','2007-11-14 00:00:00'),
('32','cagwas_study4',NULL,'4',NULL,NULL,'2','2007-11-19 00:00:00'),
('33','cagwas_study5',NULL,'5',NULL,NULL,'2','2007-11-19 00:00:00'),
('34','cagwas_study6',NULL,'6',NULL,NULL,'2','2007-11-19 00:00:00');
INSERT INTO `csm_protection_group` VALUES 
('13','CAGWASPG','CAGWASPG','2',0,'2006-08-15 00:00:00',NULL);
INSERT INTO `csm_role` VALUES 
('7','ADMIN',NULL,'2',1,'2006-08-16 00:00:00'),
('9','caGWAS_USER','caGWAS user','2',1,'2007-11-14 00:00:00');
INSERT INTO `csm_role_privilege` VALUES 
('4','7','1','2006-08-16 12:20:51'),
('5','7','6','2006-08-16 12:20:51'),
('6','7','7','2006-08-16 12:20:51'),
('7','7','4','2006-08-16 12:20:51'),
('8','7','5','2006-08-16 12:20:51'),
('9','7','2','2006-08-16 12:20:51'),
('10','7','3','2006-08-16 12:20:51'),
('27','9','1','2007-11-19 14:45:08'),
('28','9','2','2007-11-19 14:45:18'),
('29','9','3','2007-11-19 14:45:26'),
('30','9','4','2007-11-19 14:45:36'),
('31','9','5','2007-11-19 14:45:44'),
('32','9','6','2007-11-19 14:46:01'),
('33','9','7','2007-11-19 14:46:10');
INSERT INTO `csm_user` VALUES 
('15','targetadmin','target','admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2005-11-29 00:00:00'),
('43','cagwas_user','cagwas','user',NULL,NULL,NULL,NULL,'mujQcBVeovGVqZfRLsQLLA==',NULL,NULL,NULL,'2007-11-14 00:00:00');
INSERT INTO `csm_user_group` VALUES 
('104','43','18');
INSERT INTO `csm_user_group_role_pg` VALUES 
('72','43','18','9','13','2007-11-14 00:00:00'),
('73',NULL,'18','9','13','2007-11-19 00:00:00');
INSERT INTO `csm_user_pe` VALUES 
('34','20','43','2007-11-19 14:47:09'),
('35','30','43','2007-11-19 14:47:33'),
('36','31','43','2007-11-19 14:47:43'),
('37','32','43','2007-11-19 14:47:51'),
('38','33','43','2007-11-19 14:48:02'),
('39','34','43','2007-11-19 14:48:11');
ALTER TABLE `csm_application` ENABLE KEYS ;
ALTER TABLE `csm_group` ENABLE KEYS ;
ALTER TABLE `csm_pg_pe` ENABLE KEYS ;
ALTER TABLE `csm_privilege` ENABLE KEYS ;
ALTER TABLE `csm_protection_element` ENABLE KEYS ;
ALTER TABLE `csm_protection_group` ENABLE KEYS ;
ALTER TABLE `csm_role` ENABLE KEYS ;
ALTER TABLE `csm_role_privilege` ENABLE KEYS ;
ALTER TABLE `csm_user` ENABLE KEYS ;
ALTER TABLE `csm_user_group` ENABLE KEYS ;
ALTER TABLE `csm_user_group_role_pg` ENABLE KEYS ;
ALTER TABLE `csm_user_pe` ENABLE KEYS ;
