-- MySQL dump 10.11 -- -- Host: localhost Database: openvpms -- ------------------------------------------------------ -- Server version 5.0.45-community-nt /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -- -- Table structure for table `act_details` -- DROP TABLE IF EXISTS `act_details`; CREATE TABLE `act_details` ( `act_id` bigint(20) NOT NULL, `type` varchar(255) NOT NULL, `value` varchar(5000) NOT NULL, `name` varchar(255) NOT NULL, PRIMARY KEY (`act_id`,`name`), KEY `FKFB795F95ACF0613B` (`act_id`), CONSTRAINT `FKFB795F95ACF0613B` FOREIGN KEY (`act_id`) REFERENCES `acts` (`act_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Table structure for table `act_relationship_details` -- DROP TABLE IF EXISTS `act_relationship_details`; CREATE TABLE `act_relationship_details` ( `act_relationship_id` bigint(20) NOT NULL, `type` varchar(255) NOT NULL, `value` varchar(5000) NOT NULL, `name` varchar(255) NOT NULL, PRIMARY KEY (`act_relationship_id`,`name`), KEY `FKFF1068C841148A00` (`act_relationship_id`), CONSTRAINT `FKFF1068C841148A00` FOREIGN KEY (`act_relationship_id`) REFERENCES `act_relationships` (`act_relationship_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Table structure for table `act_relationships` -- DROP TABLE IF EXISTS `act_relationships`; CREATE TABLE `act_relationships` ( `act_relationship_id` bigint(20) NOT NULL auto_increment, `linkId` varchar(36) NOT NULL, `arch_short_name` varchar(100) NOT NULL, `arch_version` varchar(100) NOT NULL, `name` varchar(255) default NULL, `description` varchar(255) default NULL, `parent_child_relationship` bit(1) default NULL, `source_id` bigint(20) default NULL, `target_id` bigint(20) default NULL, PRIMARY KEY (`act_relationship_id`), KEY `FK70AA344EFCECFA9B` (`target_id`), KEY `FK70AA344EC84DFFD1` (`source_id`), CONSTRAINT `FK70AA344EC84DFFD1` FOREIGN KEY (`source_id`) REFERENCES `acts` (`act_id`) ON DELETE CASCADE, CONSTRAINT `FK70AA344EFCECFA9B` FOREIGN KEY (`target_id`) REFERENCES `acts` (`act_id`) ON DELETE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=55234 DEFAULT CHARSET=utf8; -- -- Table structure for table `action_type_descriptors` -- DROP TABLE IF EXISTS `action_type_descriptors`; CREATE TABLE `action_type_descriptors` ( `action_type_desc_id` bigint(20) NOT NULL auto_increment, `version` bigint(20) NOT NULL, `linkId` varchar(36) NOT NULL, `name` varchar(255) NOT NULL, `arch_short_name` varchar(100) NOT NULL, `arch_version` varchar(100) NOT NULL, `active` bit(1) default NULL, `class_name` varchar(255) default NULL, `method_name` varchar(255) default NULL, `assertion_type_desc_id` bigint(20) default NULL, PRIMARY KEY (`action_type_desc_id`), KEY `FK7974D84887521755` (`assertion_type_desc_id`), CONSTRAINT `FK7974D84887521755` FOREIGN KEY (`assertion_type_desc_id`) REFERENCES `assertion_type_descriptors` (`assertion_type_desc_id`) ) ENGINE=InnoDB AUTO_INCREMENT=74 DEFAULT CHARSET=utf8; -- -- Table structure for table `acts` -- DROP TABLE IF EXISTS `acts`; CREATE TABLE `acts` ( `act_id` bigint(20) NOT NULL auto_increment, `version` bigint(20) NOT NULL, `linkId` varchar(36) NOT NULL, `arch_short_name` varchar(100) NOT NULL, `arch_version` varchar(100) NOT NULL, `name` varchar(255) default NULL, `description` varchar(255) default NULL, `active` bit(1) default NULL, `title` varchar(255) default NULL, `activity_start_time` datetime default NULL, `activity_end_time` datetime default NULL, `reason` varchar(255) default NULL, `status` varchar(255) default NULL, PRIMARY KEY (`act_id`), KEY `act_start_time_idx` (`activity_start_time`), KEY `act_end_time_idx` (`activity_end_time`), KEY `act_short_name_status_idx` (`arch_short_name`,`status`) ) ENGINE=InnoDB AUTO_INCREMENT=65581 DEFAULT CHARSET=utf8; -- -- Table structure for table `archetype_descriptors` -- DROP TABLE IF EXISTS `archetype_descriptors`; CREATE TABLE `archetype_descriptors` ( `archetype_desc_id` bigint(20) NOT NULL auto_increment, `version` bigint(20) NOT NULL, `last_modified` datetime default NULL, `linkId` varchar(36) NOT NULL, `name` varchar(100) NOT NULL, `arch_short_name` varchar(100) NOT NULL, `arch_version` varchar(100) NOT NULL, `active` bit(1) default NULL, `class_name` varchar(255) NOT NULL, `display_name` varchar(255) default NULL, `is_latest` bit(1) default NULL, `is_primary` bit(1) default NULL, PRIMARY KEY (`archetype_desc_id`), UNIQUE KEY `name` (`name`) ) ENGINE=InnoDB AUTO_INCREMENT=563 DEFAULT CHARSET=utf8; -- -- Table structure for table `assertion_descriptors` -- DROP TABLE IF EXISTS `assertion_descriptors`; CREATE TABLE `assertion_descriptors` ( `assertion_desc_id` bigint(20) NOT NULL auto_increment, `version` bigint(20) NOT NULL, `linkId` varchar(36) NOT NULL, `name` varchar(255) NOT NULL, `active` bit(1) default NULL, `assertion_index` int(11) default NULL, `error_message` varchar(255) default NULL, `property_map` mediumtext, `node_desc_id` bigint(20) default NULL, `type` varchar(255) default NULL, PRIMARY KEY (`assertion_desc_id`), KEY `FKA1159D27C550DB74` (`node_desc_id`), CONSTRAINT `FKA1159D27C550DB74` FOREIGN KEY (`node_desc_id`) REFERENCES `node_descriptors` (`node_desc_id`) ) ENGINE=InnoDB AUTO_INCREMENT=1219 DEFAULT CHARSET=utf8; -- -- Table structure for table `assertion_type_descriptors` -- DROP TABLE IF EXISTS `assertion_type_descriptors`; CREATE TABLE `assertion_type_descriptors` ( `assertion_type_desc_id` bigint(20) NOT NULL auto_increment, `version` bigint(20) NOT NULL, `linkId` varchar(36) NOT NULL, `name` varchar(255) NOT NULL, `arch_short_name` varchar(100) NOT NULL, `arch_version` varchar(100) NOT NULL, `active` bit(1) default NULL, `property_archetype` varchar(255) NOT NULL, PRIMARY KEY (`assertion_type_desc_id`) ) ENGINE=InnoDB AUTO_INCREMENT=64 DEFAULT CHARSET=utf8; -- -- Table structure for table `audit_records` -- DROP TABLE IF EXISTS `audit_records`; CREATE TABLE `audit_records` ( `audit_id` bigint(20) NOT NULL auto_increment, `version` bigint(20) NOT NULL, `linkId` varchar(36) NOT NULL, `archetype_id` varchar(255) default NULL, `time_stamp` datetime default NULL, `object_id` bigint(20) default NULL, `service` varchar(255) default NULL, `operation` varchar(255) default NULL, `user` varchar(255) default NULL, PRIMARY KEY (`audit_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Table structure for table `contact_classifications` -- DROP TABLE IF EXISTS `contact_classifications`; CREATE TABLE `contact_classifications` ( `contact_id` bigint(20) NOT NULL, `lookup_id` bigint(20) NOT NULL, PRIMARY KEY (`contact_id`,`lookup_id`), KEY `FK5AC8832E519E590F` (`contact_id`), KEY `FK5AC8832ECEABD10B` (`lookup_id`), CONSTRAINT `FK5AC8832E519E590F` FOREIGN KEY (`contact_id`) REFERENCES `contacts` (`contact_id`), CONSTRAINT `FK5AC8832ECEABD10B` FOREIGN KEY (`lookup_id`) REFERENCES `lookups` (`lookup_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Table structure for table `contact_details` -- DROP TABLE IF EXISTS `contact_details`; CREATE TABLE `contact_details` ( `contact_id` bigint(20) NOT NULL, `type` varchar(255) NOT NULL, `value` varchar(5000) NOT NULL, `name` varchar(255) NOT NULL, PRIMARY KEY (`contact_id`,`name`), KEY `FKA3499D23519E590F` (`contact_id`), CONSTRAINT `FKA3499D23519E590F` FOREIGN KEY (`contact_id`) REFERENCES `contacts` (`contact_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Table structure for table `contacts` -- DROP TABLE IF EXISTS `contacts`; CREATE TABLE `contacts` ( `contact_id` bigint(20) NOT NULL auto_increment, `version` bigint(20) NOT NULL, `linkId` varchar(36) NOT NULL, `party_id` bigint(20) default NULL, `arch_short_name` varchar(100) NOT NULL, `arch_version` varchar(100) NOT NULL, `name` varchar(255) default NULL, `description` varchar(255) default NULL, `active` bit(1) default NULL, `active_start_time` date default NULL, `active_end_time` date default NULL, PRIMARY KEY (`contact_id`), KEY `FKDE2D605349856C8F` (`party_id`), CONSTRAINT `FKDE2D605349856C8F` FOREIGN KEY (`party_id`) REFERENCES `parties` (`party_id`) ON DELETE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=3558 DEFAULT CHARSET=utf8; -- -- Table structure for table `document_acts` -- DROP TABLE IF EXISTS `document_acts`; CREATE TABLE `document_acts` ( `document_act_id` bigint(20) NOT NULL, `doc_version` varchar(255) default NULL, `file_name` varchar(255) default NULL, `mime_type` varchar(255) default NULL, `printed` bit(1) default NULL, `document_id` bigint(20) default NULL, PRIMARY KEY (`document_act_id`), KEY `FK5E78FAC5A5E628DF` (`document_act_id`), KEY `FK5E78FAC592203729` (`document_id`), CONSTRAINT `FK5E78FAC592203729` FOREIGN KEY (`document_id`) REFERENCES `documents` (`document_id`), CONSTRAINT `FK5E78FAC5A5E628DF` FOREIGN KEY (`document_act_id`) REFERENCES `acts` (`act_id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Table structure for table `document_details` -- DROP TABLE IF EXISTS `document_details`; CREATE TABLE `document_details` ( `document_id` bigint(20) NOT NULL, `type` varchar(255) NOT NULL, `value` varchar(5000) NOT NULL, `name` varchar(255) NOT NULL, PRIMARY KEY (`document_id`,`name`), KEY `FK829C1F1E423E836A` (`document_id`), CONSTRAINT `FK829C1F1E423E836A` FOREIGN KEY (`document_id`) REFERENCES `documents` (`document_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Table structure for table `documents` -- DROP TABLE IF EXISTS `documents`; CREATE TABLE `documents` ( `document_id` bigint(20) NOT NULL auto_increment, `version` bigint(20) NOT NULL, `linkId` varchar(36) NOT NULL, `arch_short_name` varchar(100) NOT NULL, `arch_version` varchar(100) NOT NULL, `name` varchar(255) default NULL, `description` varchar(255) default NULL, `mime_type` varchar(255) default NULL, `doc_size` int(11) default NULL, `checksum` bigint(20) default NULL, `contents` longblob, PRIMARY KEY (`document_id`) ) ENGINE=InnoDB AUTO_INCREMENT=1592 DEFAULT CHARSET=utf8; -- -- Table structure for table `entities` -- DROP TABLE IF EXISTS `entities`; CREATE TABLE `entities` ( `entity_id` bigint(20) NOT NULL auto_increment, `version` bigint(20) NOT NULL, `linkId` varchar(36) NOT NULL, `arch_short_name` varchar(100) NOT NULL, `arch_version` varchar(100) NOT NULL, `name` varchar(100) default NULL, `description` varchar(255) default NULL, `active` bit(1) default NULL, PRIMARY KEY (`entity_id`), KEY `entity_name_idx` (`name`), KEY `entity_arch_sn_name_idx` (`arch_short_name`,`name`), KEY `entity_short_name_idx` (`arch_short_name`) ) ENGINE=InnoDB AUTO_INCREMENT=6147 DEFAULT CHARSET=utf8; -- -- Table structure for table `entity_classifications` -- DROP TABLE IF EXISTS `entity_classifications`; CREATE TABLE `entity_classifications` ( `entity_id` bigint(20) NOT NULL, `lookup_id` bigint(20) NOT NULL, PRIMARY KEY (`entity_id`,`lookup_id`), KEY `FK76B55CF1CEABD10B` (`lookup_id`), KEY `FK76B55CF164CA9ADA` (`entity_id`), CONSTRAINT `FK76B55CF164CA9ADA` FOREIGN KEY (`entity_id`) REFERENCES `entities` (`entity_id`), CONSTRAINT `FK76B55CF1CEABD10B` FOREIGN KEY (`lookup_id`) REFERENCES `lookups` (`lookup_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Table structure for table `entity_details` -- DROP TABLE IF EXISTS `entity_details`; CREATE TABLE `entity_details` ( `entity_id` bigint(20) NOT NULL, `type` varchar(255) NOT NULL, `value` varchar(5000) NOT NULL, `name` varchar(255) NOT NULL, PRIMARY KEY (`entity_id`,`name`), KEY `FKD621E9E664CA9ADA` (`entity_id`), CONSTRAINT `FKD621E9E664CA9ADA` FOREIGN KEY (`entity_id`) REFERENCES `entities` (`entity_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Table structure for table `entity_identities` -- DROP TABLE IF EXISTS `entity_identities`; CREATE TABLE `entity_identities` ( `entity_identity_id` bigint(20) NOT NULL auto_increment, `version` bigint(20) NOT NULL, `linkId` varchar(36) NOT NULL, `entity_id` bigint(20) default NULL, `arch_short_name` varchar(100) NOT NULL, `arch_version` varchar(100) NOT NULL, `name` varchar(255) default NULL, `description` varchar(255) default NULL, `active` bit(1) default NULL, `identity` varchar(255) default NULL, PRIMARY KEY (`entity_identity_id`), KEY `entity_identity_name_idx` (`name`), KEY `FKB1D93FB864CA9ADA` (`entity_id`), CONSTRAINT `FKB1D93FB864CA9ADA` FOREIGN KEY (`entity_id`) REFERENCES `entities` (`entity_id`) ON DELETE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=353 DEFAULT CHARSET=utf8; -- -- Table structure for table `entity_identity_details` -- DROP TABLE IF EXISTS `entity_identity_details`; CREATE TABLE `entity_identity_details` ( `entity_identity_id` bigint(20) NOT NULL, `type` varchar(255) NOT NULL, `value` varchar(5000) NOT NULL, `name` varchar(255) NOT NULL, PRIMARY KEY (`entity_identity_id`,`name`), KEY `FK4794CC9DBDCAE3A1` (`entity_identity_id`), CONSTRAINT `FK4794CC9DBDCAE3A1` FOREIGN KEY (`entity_identity_id`) REFERENCES `entity_identities` (`entity_identity_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Table structure for table `entity_relationship_details` -- DROP TABLE IF EXISTS `entity_relationship_details`; CREATE TABLE `entity_relationship_details` ( `entity_relationship_id` bigint(20) NOT NULL, `type` varchar(255) NOT NULL, `value` varchar(5000) NOT NULL, `name` varchar(255) NOT NULL, PRIMARY KEY (`entity_relationship_id`,`name`), KEY `FKBB44EA1739208DE1` (`entity_relationship_id`), CONSTRAINT `FKBB44EA1739208DE1` FOREIGN KEY (`entity_relationship_id`) REFERENCES `entity_relationships` (`entity_relationship_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Table structure for table `entity_relationships` -- DROP TABLE IF EXISTS `entity_relationships`; CREATE TABLE `entity_relationships` ( `entity_relationship_id` bigint(20) NOT NULL auto_increment, `version` bigint(20) NOT NULL, `linkId` varchar(36) NOT NULL, `arch_short_name` varchar(100) NOT NULL, `arch_version` varchar(100) NOT NULL, `name` varchar(255) default NULL, `description` varchar(255) default NULL, `active_start_time` datetime default NULL, `active_end_time` datetime default NULL, `sequence` int(11) NOT NULL, `source_id` bigint(20) default NULL, `target_id` bigint(20) default NULL, `identity_id` bigint(20) default NULL, PRIMARY KEY (`entity_relationship_id`), KEY `FK861BFDDF86CE5DFD` (`identity_id`), KEY `FK861BFDDFA5B2869` (`source_id`), KEY `FK861BFDDF3EFA2333` (`target_id`), CONSTRAINT `FK861BFDDF3EFA2333` FOREIGN KEY (`target_id`) REFERENCES `entities` (`entity_id`) ON DELETE CASCADE, CONSTRAINT `FK861BFDDF86CE5DFD` FOREIGN KEY (`identity_id`) REFERENCES `entity_identities` (`entity_identity_id`), CONSTRAINT `FK861BFDDFA5B2869` FOREIGN KEY (`source_id`) REFERENCES `entities` (`entity_id`) ON DELETE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=10204 DEFAULT CHARSET=utf8; -- -- Table structure for table `etl_log` -- DROP TABLE IF EXISTS `etl_log`; CREATE TABLE `etl_log` ( `log_id` bigint(20) NOT NULL auto_increment, `row_id` varchar(32) default NULL, `loader` varchar(32) default NULL, `archetype` varchar(255) default NULL, `collection_index` int(11) default NULL, `id` bigint(20) default NULL, `linkId` varchar(36) default NULL, `error_messages` varchar(1536) default NULL, PRIMARY KEY (`log_id`), KEY `etl_rowId_loader_idx` (`row_id`,`loader`), KEY `etl_rowId_archetype_idx` (`row_id`,`archetype`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Table structure for table `financial_acts` -- DROP TABLE IF EXISTS `financial_acts`; CREATE TABLE `financial_acts` ( `financial_act_id` bigint(20) NOT NULL, `quantity` decimal(18,3) default NULL, `fixed_amount` decimal(18,3) default NULL, `unit_amount` decimal(18,3) default NULL, `fixed_cost` decimal(18,3) default NULL, `unit_cost` decimal(18,3) default NULL, `tax_amount` decimal(18,3) default NULL, `total` decimal(18,3) default NULL, `allocated_amount` decimal(18,3) default NULL, `credit` bit(1) default NULL, `printed` bit(1) default NULL, PRIMARY KEY (`financial_act_id`), KEY `FK3D69E4178C4205B1` (`financial_act_id`), CONSTRAINT `FK3D69E4178C4205B1` FOREIGN KEY (`financial_act_id`) REFERENCES `acts` (`act_id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Table structure for table `granted_authorities` -- DROP TABLE IF EXISTS `granted_authorities`; CREATE TABLE `granted_authorities` ( `granted_authority_id` bigint(20) NOT NULL auto_increment, `version` bigint(20) NOT NULL, `linkId` varchar(36) NOT NULL, `arch_short_name` varchar(100) NOT NULL, `arch_version` varchar(100) NOT NULL, `name` varchar(255) default NULL, `description` varchar(255) default NULL, `active` bit(1) default NULL, `service_name` varchar(255) default NULL, `method` varchar(255) default NULL, `archetype` varchar(100) default NULL, PRIMARY KEY (`granted_authority_id`) ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; -- -- Table structure for table `lookup_details` -- DROP TABLE IF EXISTS `lookup_details`; CREATE TABLE `lookup_details` ( `lookup_id` bigint(20) NOT NULL, `type` varchar(255) NOT NULL, `value` varchar(5000) NOT NULL, `name` varchar(255) NOT NULL, PRIMARY KEY (`lookup_id`,`name`), KEY `FKB2E8287DCEABD10B` (`lookup_id`), CONSTRAINT `FKB2E8287DCEABD10B` FOREIGN KEY (`lookup_id`) REFERENCES `lookups` (`lookup_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Table structure for table `lookup_relationship_details` -- DROP TABLE IF EXISTS `lookup_relationship_details`; CREATE TABLE `lookup_relationship_details` ( `lookup_relationship_id` bigint(20) NOT NULL, `type` varchar(255) NOT NULL, `value` varchar(5000) NOT NULL, `name` varchar(255) NOT NULL, PRIMARY KEY (`lookup_relationship_id`,`name`), KEY `FK40E558E0BAD140A0` (`lookup_relationship_id`), CONSTRAINT `FK40E558E0BAD140A0` FOREIGN KEY (`lookup_relationship_id`) REFERENCES `lookup_relationships` (`lookup_relationship_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Table structure for table `lookup_relationships` -- DROP TABLE IF EXISTS `lookup_relationships`; CREATE TABLE `lookup_relationships` ( `lookup_relationship_id` bigint(20) NOT NULL auto_increment, `version` bigint(20) NOT NULL, `linkId` varchar(36) NOT NULL, `arch_short_name` varchar(100) NOT NULL, `arch_version` varchar(100) NOT NULL, `active` bit(1) default NULL, `source_id` bigint(20) default NULL, `target_id` bigint(20) default NULL, PRIMARY KEY (`lookup_relationship_id`), KEY `FK2C88AF36F5B96353` (`target_id`), KEY `FK2C88AF36C11A6889` (`source_id`), CONSTRAINT `FK2C88AF36C11A6889` FOREIGN KEY (`source_id`) REFERENCES `lookups` (`lookup_id`) ON DELETE CASCADE, CONSTRAINT `FK2C88AF36F5B96353` FOREIGN KEY (`target_id`) REFERENCES `lookups` (`lookup_id`) ON DELETE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=405 DEFAULT CHARSET=utf8; -- -- Table structure for table `lookups` -- DROP TABLE IF EXISTS `lookups`; CREATE TABLE `lookups` ( `lookup_id` bigint(20) NOT NULL auto_increment, `version` bigint(20) NOT NULL, `linkId` varchar(36) NOT NULL, `active` bit(1) default NULL, `arch_short_name` varchar(100) NOT NULL, `arch_version` varchar(100) NOT NULL, `code` varchar(100) NOT NULL, `name` varchar(255) default NULL, `description` varchar(255) default NULL, `default_lookup` bit(1) default NULL, PRIMARY KEY (`lookup_id`), UNIQUE KEY `arch_short_name` (`arch_short_name`,`code`), KEY `lookup_short_name_index` (`arch_short_name`) ) ENGINE=InnoDB AUTO_INCREMENT=608 DEFAULT CHARSET=utf8; -- -- Table structure for table `node_descriptors` -- DROP TABLE IF EXISTS `node_descriptors`; CREATE TABLE `node_descriptors` ( `node_desc_id` bigint(20) NOT NULL auto_increment, `version` bigint(20) NOT NULL, `linkId` varchar(36) NOT NULL, `name` varchar(255) NOT NULL, `active` bit(1) default NULL, `display_name` varchar(255) default NULL, `type` varchar(255) NOT NULL, `path` varchar(255) NOT NULL, `base_name` varchar(255) default NULL, `default_value` varchar(255) default NULL, `filter` varchar(255) default NULL, `derived_value` varchar(255) default NULL, `is_readonly` bit(1) default NULL, `is_hidden` bit(1) default NULL, `is_derived` bit(1) default NULL, `min_cardinality` int(11) default NULL, `max_cardinality` int(11) default NULL, `min_length` int(11) default NULL, `max_length` int(11) default NULL, `node_index` int(11) default NULL, `is_parent_child` bit(1) default NULL, `parent_id` bigint(20) default NULL, `archetype_desc_id` bigint(20) default NULL, PRIMARY KEY (`node_desc_id`), KEY `FKAB46B4278E2DBBF8` (`parent_id`), KEY `FKAB46B42741D3C6F4` (`archetype_desc_id`), CONSTRAINT `FKAB46B42741D3C6F4` FOREIGN KEY (`archetype_desc_id`) REFERENCES `archetype_descriptors` (`archetype_desc_id`) ON DELETE CASCADE, CONSTRAINT `FKAB46B4278E2DBBF8` FOREIGN KEY (`parent_id`) REFERENCES `node_descriptors` (`node_desc_id`) ON DELETE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=4621 DEFAULT CHARSET=utf8; -- -- Table structure for table `participation_details` -- DROP TABLE IF EXISTS `participation_details`; CREATE TABLE `participation_details` ( `participation_id` bigint(20) NOT NULL, `type` varchar(255) NOT NULL, `value` varchar(5000) NOT NULL, `name` varchar(255) NOT NULL, PRIMARY KEY (`participation_id`,`name`), KEY `FK64ED55445A24061A` (`participation_id`), CONSTRAINT `FK64ED55445A24061A` FOREIGN KEY (`participation_id`) REFERENCES `participations` (`participation_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Table structure for table `participations` -- DROP TABLE IF EXISTS `participations`; CREATE TABLE `participations` ( `participation_id` bigint(20) NOT NULL auto_increment, `version` bigint(20) NOT NULL, `linkId` varchar(36) NOT NULL, `arch_short_name` varchar(100) NOT NULL, `arch_version` varchar(100) NOT NULL, `name` varchar(255) default NULL, `description` varchar(255) default NULL, `active` bit(1) default NULL, `entity_id` bigint(20) default NULL, `act_id` bigint(20) default NULL, `act_arch_short_name` varchar(100) default NULL, `activity_start_time` datetime default NULL, `activity_end_time` datetime default NULL, PRIMARY KEY (`participation_id`), KEY `participation_arch_short_name_idx` (`arch_short_name`), KEY `participation_entity_linkId_act_sn_index_idx` (`act_arch_short_name`), KEY `FKA301B52D8B907FA` (`act_id`), KEY `FKA301B524372B7A1` (`entity_id`), KEY `participation_entity_start_time_idx` (`entity_id`,`activity_start_time`), KEY `participation_entity_end_time_idx` (`entity_id`,`activity_end_time`), KEY `participation_act_entity_start_time_idx` (`act_arch_short_name`,`entity_id`,`activity_start_time`), CONSTRAINT `FKA301B524372B7A1` FOREIGN KEY (`entity_id`) REFERENCES `entities` (`entity_id`), CONSTRAINT `FKA301B52D8B907FA` FOREIGN KEY (`act_id`) REFERENCES `acts` (`act_id`) ON DELETE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=166170 DEFAULT CHARSET=utf8; -- -- Table structure for table `parties` -- DROP TABLE IF EXISTS `parties`; CREATE TABLE `parties` ( `party_id` bigint(20) NOT NULL, PRIMARY KEY (`party_id`), KEY `FKD0BCCA04D7D260F7` (`party_id`), CONSTRAINT `FKD0BCCA04D7D260F7` FOREIGN KEY (`party_id`) REFERENCES `entities` (`entity_id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Table structure for table `product_price_classifications` -- DROP TABLE IF EXISTS `product_price_classifications`; CREATE TABLE `product_price_classifications` ( `product_price_id` bigint(20) NOT NULL, `lookup_id` bigint(20) NOT NULL, PRIMARY KEY (`product_price_id`,`lookup_id`), KEY `FK9EC6BF07CEABD10B` (`lookup_id`), KEY `FK9EC6BF07BCF3BC5D` (`product_price_id`), CONSTRAINT `FK9EC6BF07BCF3BC5D` FOREIGN KEY (`product_price_id`) REFERENCES `product_prices` (`product_price_id`), CONSTRAINT `FK9EC6BF07CEABD10B` FOREIGN KEY (`lookup_id`) REFERENCES `lookups` (`lookup_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Table structure for table `product_price_details` -- DROP TABLE IF EXISTS `product_price_details`; CREATE TABLE `product_price_details` ( `product_price_id` bigint(20) NOT NULL, `type` varchar(255) NOT NULL, `value` varchar(5000) NOT NULL, `name` varchar(255) NOT NULL, PRIMARY KEY (`product_price_id`,`name`), KEY `FKF9A9C1FCBCF3BC5D` (`product_price_id`), CONSTRAINT `FKF9A9C1FCBCF3BC5D` FOREIGN KEY (`product_price_id`) REFERENCES `product_prices` (`product_price_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Table structure for table `product_prices` -- DROP TABLE IF EXISTS `product_prices`; CREATE TABLE `product_prices` ( `product_price_id` bigint(20) NOT NULL auto_increment, `version` bigint(20) NOT NULL, `linkId` varchar(36) NOT NULL, `arch_short_name` varchar(100) NOT NULL, `arch_version` varchar(100) NOT NULL, `name` varchar(255) default NULL, `description` varchar(255) default NULL, `start_time` datetime default NULL, `end_time` datetime default NULL, `is_fixed` bit(1) default NULL, `price` decimal(18,3) default NULL, `active` bit(1) default NULL, `product_id` bigint(20) default NULL, PRIMARY KEY (`product_price_id`), KEY `FKFBD40D9A43C96078` (`product_id`), CONSTRAINT `FKFBD40D9A43C96078` FOREIGN KEY (`product_id`) REFERENCES `products` (`product_id`) ON DELETE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=2615 DEFAULT CHARSET=utf8; -- -- Table structure for table `products` -- DROP TABLE IF EXISTS `products`; CREATE TABLE `products` ( `product_id` bigint(20) NOT NULL, PRIMARY KEY (`product_id`), KEY `FKC42BD164F96B864E` (`product_id`), CONSTRAINT `FKC42BD164F96B864E` FOREIGN KEY (`product_id`) REFERENCES `entities` (`entity_id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Table structure for table `roles_authorities` -- DROP TABLE IF EXISTS `roles_authorities`; CREATE TABLE `roles_authorities` ( `security_role_id` bigint(20) NOT NULL, `authority_id` bigint(20) NOT NULL, PRIMARY KEY (`security_role_id`,`authority_id`), KEY `FKE9CCCC9FEF0F2E9F` (`authority_id`), KEY `FKE9CCCC9F9A38A0E6` (`security_role_id`), CONSTRAINT `FKE9CCCC9F9A38A0E6` FOREIGN KEY (`security_role_id`) REFERENCES `security_roles` (`security_role_id`), CONSTRAINT `FKE9CCCC9FEF0F2E9F` FOREIGN KEY (`authority_id`) REFERENCES `granted_authorities` (`granted_authority_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Table structure for table `security_roles` -- DROP TABLE IF EXISTS `security_roles`; CREATE TABLE `security_roles` ( `security_role_id` bigint(20) NOT NULL auto_increment, `version` bigint(20) NOT NULL, `linkId` varchar(36) NOT NULL, `arch_short_name` varchar(100) NOT NULL, `arch_version` varchar(100) NOT NULL, `name` varchar(255) default NULL, `description` varchar(255) default NULL, `active` bit(1) default NULL, PRIMARY KEY (`security_role_id`) ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; -- -- Table structure for table `user_roles` -- DROP TABLE IF EXISTS `user_roles`; CREATE TABLE `user_roles` ( `user_id` bigint(20) NOT NULL, `security_role_id` bigint(20) NOT NULL, PRIMARY KEY (`user_id`,`security_role_id`), KEY `FK734299497649F665` (`user_id`), KEY `FK734299499A38A0E6` (`security_role_id`), CONSTRAINT `FK734299497649F665` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`), CONSTRAINT `FK734299499A38A0E6` FOREIGN KEY (`security_role_id`) REFERENCES `security_roles` (`security_role_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Table structure for table `users` -- DROP TABLE IF EXISTS `users`; CREATE TABLE `users` ( `user_id` bigint(20) NOT NULL, `user_name` varchar(20) NOT NULL, `password` varchar(20) default NULL, PRIMARY KEY (`user_id`), UNIQUE KEY `user_name` (`user_name`), KEY `FK6A68E088829A9F2` (`user_id`), CONSTRAINT `FK6A68E088829A9F2` FOREIGN KEY (`user_id`) REFERENCES `entities` (`entity_id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -- Dump completed on 2011-03-24 22:07:26