Commit e45b7dbea922f490000a49212c67c5ccf3a504b8

Authored by nbm
1 parent adce30a6

Near-final tables for 2.99.2


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@3991 c91229c3-7414-0410-bfa2-8a42b809f60b
sql/mysql/install/data.sql
1 -- phpMyAdmin SQL Dump 1 -- phpMyAdmin SQL Dump
2 --- version 2.6.4-pl1-Debian-1ubuntu1.1 2 +-- version 2.6.4-pl3-Debian-1
3 -- http://www.phpmyadmin.net 3 -- http://www.phpmyadmin.net
4 -- 4 --
5 -- Host: localhost 5 -- Host: localhost
6 --- Generation Time: Nov 10, 2005 at 11:59 AM 6 +-- Generation Time: Nov 15, 2005 at 04:31 PM
7 -- Server version: 4.0.24 7 -- Server version: 4.0.24
8 -- PHP Version: 4.4.0-3 8 -- PHP Version: 4.4.0-3
9 9
10 SET FOREIGN_KEY_CHECKS=0; 10 SET FOREIGN_KEY_CHECKS=0;
11 -  
12 -- 11 --
13 --- Database: `ktpristine` 12 +-- Database: `kt2991`
14 -- 13 --
15 14
16 -- 15 --
@@ -198,7 +197,7 @@ INSERT INTO document_types_lookup VALUES (1, 'Default'); @@ -198,7 +197,7 @@ INSERT INTO document_types_lookup VALUES (1, 'Default');
198 -- Dumping data for table `fieldsets` 197 -- Dumping data for table `fieldsets`
199 -- 198 --
200 199
201 -INSERT INTO fieldsets VALUES (1, 'Category', 'local.category', 0, 0, 1, 1, 0, 1); 200 +INSERT INTO fieldsets VALUES (1, 'Category', 'local.category', 0, 0, 1, 1, 0, 1, 0);
202 201
203 -- 202 --
204 -- Dumping data for table `folder_doctypes_link` 203 -- Dumping data for table `folder_doctypes_link`
@@ -565,6 +564,16 @@ INSERT INTO permission_descriptors VALUES (1, 'd41d8cd98f00b204e9800998ecf8427e' @@ -565,6 +564,16 @@ INSERT INTO permission_descriptors VALUES (1, 'd41d8cd98f00b204e9800998ecf8427e'
565 INSERT INTO permission_descriptors VALUES (2, 'a689e7c4dc953de8d93b1ed4843b2dfe', 'group(1)'); 564 INSERT INTO permission_descriptors VALUES (2, 'a689e7c4dc953de8d93b1ed4843b2dfe', 'group(1)');
566 565
567 -- 566 --
  567 +-- Dumping data for table `permission_dynamic_assignments`
  568 +--
  569 +
  570 +
  571 +--
  572 +-- Dumping data for table `permission_dynamic_conditions`
  573 +--
  574 +
  575 +
  576 +--
568 -- Dumping data for table `permission_lookup_assignments` 577 -- Dumping data for table `permission_lookup_assignments`
569 -- 578 --
570 579
@@ -602,6 +611,11 @@ INSERT INTO permissions VALUES (3, 'ktcore.permissions.addFolder', 'Core: Add Fo @@ -602,6 +611,11 @@ INSERT INTO permissions VALUES (3, 'ktcore.permissions.addFolder', 'Core: Add Fo
602 611
603 612
604 -- 613 --
  614 +-- Dumping data for table `saved_searches`
  615 +--
  616 +
  617 +
  618 +--
605 -- Dumping data for table `search_document_user_link` 619 -- Dumping data for table `search_document_user_link`
606 -- 620 --
607 621
@@ -1003,6 +1017,11 @@ INSERT INTO zseq_permission_assignments VALUES (3); @@ -1003,6 +1017,11 @@ INSERT INTO zseq_permission_assignments VALUES (3);
1003 INSERT INTO zseq_permission_descriptors VALUES (2); 1017 INSERT INTO zseq_permission_descriptors VALUES (2);
1004 1018
1005 -- 1019 --
  1020 +-- Dumping data for table `zseq_permission_dynamic_conditions`
  1021 +--
  1022 +
  1023 +
  1024 +--
1006 -- Dumping data for table `zseq_permission_lookup_assignments` 1025 -- Dumping data for table `zseq_permission_lookup_assignments`
1007 -- 1026 --
1008 1027
@@ -1033,6 +1052,11 @@ INSERT INTO zseq_permissions VALUES (3); @@ -1033,6 +1052,11 @@ INSERT INTO zseq_permissions VALUES (3);
1033 INSERT INTO zseq_roles VALUES (1); 1052 INSERT INTO zseq_roles VALUES (1);
1034 1053
1035 -- 1054 --
  1055 +-- Dumping data for table `zseq_saved_searches`
  1056 +--
  1057 +
  1058 +
  1059 +--
1036 -- Dumping data for table `zseq_search_document_user_link` 1060 -- Dumping data for table `zseq_search_document_user_link`
1037 -- 1061 --
1038 1062
sql/mysql/install/structure.sql
1 -- phpMyAdmin SQL Dump 1 -- phpMyAdmin SQL Dump
2 --- version 2.6.4-pl1-Debian-1ubuntu1.1 2 +-- version 2.6.4-pl3-Debian-1
3 -- http://www.phpmyadmin.net 3 -- http://www.phpmyadmin.net
4 -- 4 --
5 -- Host: localhost 5 -- Host: localhost
6 --- Generation Time: Nov 10, 2005 at 11:58 AM 6 +-- Generation Time: Nov 15, 2005 at 04:33 PM
7 -- Server version: 4.0.24 7 -- Server version: 4.0.24
8 -- PHP Version: 4.4.0-3 8 -- PHP Version: 4.4.0-3
  9 +
  10 +SET FOREIGN_KEY_CHECKS=0;
9 -- 11 --
10 --- Database: `ktpristine` 12 +-- Database: `kt2991`
11 -- 13 --
12 14
13 -- -------------------------------------------------------- 15 -- --------------------------------------------------------
@@ -498,9 +500,11 @@ CREATE TABLE fieldsets ( @@ -498,9 +500,11 @@ CREATE TABLE fieldsets (
498 is_generic tinyint(1) NOT NULL default '0', 500 is_generic tinyint(1) NOT NULL default '0',
499 is_complex tinyint(1) NOT NULL default '0', 501 is_complex tinyint(1) NOT NULL default '0',
500 is_complete tinyint(1) NOT NULL default '1', 502 is_complete tinyint(1) NOT NULL default '1',
  503 + is_system tinyint(1) unsigned NOT NULL default '0',
501 UNIQUE KEY id (id), 504 UNIQUE KEY id (id),
502 KEY is_generic (is_generic), 505 KEY is_generic (is_generic),
503 KEY is_complete (is_complete), 506 KEY is_complete (is_complete),
  507 + KEY is_system (is_system),
504 KEY master_field (master_field) 508 KEY master_field (master_field)
505 ) TYPE=InnoDB; 509 ) TYPE=InnoDB;
506 510
@@ -849,6 +853,36 @@ CREATE TABLE permission_descriptors ( @@ -849,6 +853,36 @@ CREATE TABLE permission_descriptors (
849 -- -------------------------------------------------------- 853 -- --------------------------------------------------------
850 854
851 -- 855 --
  856 +-- Table structure for table `permission_dynamic_assignments`
  857 +--
  858 +
  859 +CREATE TABLE permission_dynamic_assignments (
  860 + dynamic_condition_id int(11) NOT NULL default '0',
  861 + permission_id int(11) NOT NULL default '0',
  862 + KEY dynamic_conditiond_id (dynamic_condition_id),
  863 + KEY permission_id (permission_id)
  864 +) TYPE=InnoDB;
  865 +
  866 +-- --------------------------------------------------------
  867 +
  868 +--
  869 +-- Table structure for table `permission_dynamic_conditions`
  870 +--
  871 +
  872 +CREATE TABLE permission_dynamic_conditions (
  873 + id int(11) NOT NULL default '0',
  874 + permission_object_id int(11) NOT NULL default '0',
  875 + group_id int(11) NOT NULL default '0',
  876 + condition_id int(11) NOT NULL default '0',
  877 + PRIMARY KEY (id),
  878 + KEY permission_object_id (permission_object_id),
  879 + KEY group_id (group_id),
  880 + KEY condition_id (condition_id)
  881 +) TYPE=InnoDB;
  882 +
  883 +-- --------------------------------------------------------
  884 +
  885 +--
852 -- Table structure for table `permission_lookup_assignments` 886 -- Table structure for table `permission_lookup_assignments`
853 -- 887 --
854 888
@@ -920,6 +954,27 @@ CREATE TABLE roles ( @@ -920,6 +954,27 @@ CREATE TABLE roles (
920 -- -------------------------------------------------------- 954 -- --------------------------------------------------------
921 955
922 -- 956 --
  957 +-- Table structure for table `saved_searches`
  958 +--
  959 +
  960 +CREATE TABLE saved_searches (
  961 + id int(11) NOT NULL default '0',
  962 + name varchar(50) NOT NULL default '',
  963 + namespace varchar(250) NOT NULL default '',
  964 + is_condition tinyint(1) NOT NULL default '0',
  965 + is_complete tinyint(1) NOT NULL default '0',
  966 + user_id int(10) default NULL,
  967 + search text NOT NULL,
  968 + PRIMARY KEY (id),
  969 + KEY namespace (namespace),
  970 + KEY is_condition (is_condition),
  971 + KEY is_complete (is_complete),
  972 + KEY user_id (user_id)
  973 +) TYPE=InnoDB;
  974 +
  975 +-- --------------------------------------------------------
  976 +
  977 +--
923 -- Table structure for table `search_document_user_link` 978 -- Table structure for table `search_document_user_link`
924 -- 979 --
925 980
@@ -1192,12 +1247,14 @@ CREATE TABLE workflow_transitions ( @@ -1192,12 +1247,14 @@ CREATE TABLE workflow_transitions (
1192 guard_permission_id int(11) default '0', 1247 guard_permission_id int(11) default '0',
1193 guard_group_id int(11) default '0', 1248 guard_group_id int(11) default '0',
1194 guard_role_id int(11) default '0', 1249 guard_role_id int(11) default '0',
  1250 + guard_condition_id int(11) default NULL,
1195 PRIMARY KEY (id), 1251 PRIMARY KEY (id),
1196 UNIQUE KEY workflow_id_2 (workflow_id,name), 1252 UNIQUE KEY workflow_id_2 (workflow_id,name),
1197 KEY workflow_id (workflow_id), 1253 KEY workflow_id (workflow_id),
1198 KEY name (name), 1254 KEY name (name),
1199 KEY target_state_id (target_state_id), 1255 KEY target_state_id (target_state_id),
1200 KEY guard_permission_id (guard_permission_id), 1256 KEY guard_permission_id (guard_permission_id),
  1257 + KEY guard_condition (guard_condition_id),
1201 KEY guard_group_id (guard_group_id), 1258 KEY guard_group_id (guard_group_id),
1202 KEY guard_role_id (guard_role_id) 1259 KEY guard_role_id (guard_role_id)
1203 ) TYPE=InnoDB; 1260 ) TYPE=InnoDB;
@@ -1705,6 +1762,17 @@ CREATE TABLE zseq_permission_descriptors ( @@ -1705,6 +1762,17 @@ CREATE TABLE zseq_permission_descriptors (
1705 -- -------------------------------------------------------- 1762 -- --------------------------------------------------------
1706 1763
1707 -- 1764 --
  1765 +-- Table structure for table `zseq_permission_dynamic_conditions`
  1766 +--
  1767 +
  1768 +CREATE TABLE zseq_permission_dynamic_conditions (
  1769 + id int(10) unsigned NOT NULL auto_increment,
  1770 + PRIMARY KEY (id)
  1771 +) TYPE=MyISAM;
  1772 +
  1773 +-- --------------------------------------------------------
  1774 +
  1775 +--
1708 -- Table structure for table `zseq_permission_lookup_assignments` 1776 -- Table structure for table `zseq_permission_lookup_assignments`
1709 -- 1777 --
1710 1778
@@ -1760,6 +1828,17 @@ CREATE TABLE zseq_roles ( @@ -1760,6 +1828,17 @@ CREATE TABLE zseq_roles (
1760 -- -------------------------------------------------------- 1828 -- --------------------------------------------------------
1761 1829
1762 -- 1830 --
  1831 +-- Table structure for table `zseq_saved_searches`
  1832 +--
  1833 +
  1834 +CREATE TABLE zseq_saved_searches (
  1835 + id int(10) unsigned NOT NULL auto_increment,
  1836 + PRIMARY KEY (id)
  1837 +) TYPE=MyISAM;
  1838 +
  1839 +-- --------------------------------------------------------
  1840 +
  1841 +--
1763 -- Table structure for table `zseq_search_document_user_link` 1842 -- Table structure for table `zseq_search_document_user_link`
1764 -- 1843 --
1765 1844
@@ -2016,6 +2095,21 @@ ALTER TABLE `permission_descriptor_users` @@ -2016,6 +2095,21 @@ ALTER TABLE `permission_descriptor_users`
2016 ADD CONSTRAINT `permission_descriptor_users_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE; 2095 ADD CONSTRAINT `permission_descriptor_users_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;
2017 2096
2018 -- 2097 --
  2098 +-- Constraints for table `permission_dynamic_assignments`
  2099 +--
  2100 +ALTER TABLE `permission_dynamic_assignments`
  2101 + ADD CONSTRAINT `permission_dynamic_assignments_ibfk_2` FOREIGN KEY (`dynamic_condition_id`) REFERENCES `permission_dynamic_conditions` (`id`) ON DELETE CASCADE,
  2102 + ADD CONSTRAINT `permission_dynamic_assignments_ibfk_3` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE;
  2103 +
  2104 +--
  2105 +-- Constraints for table `permission_dynamic_conditions`
  2106 +--
  2107 +ALTER TABLE `permission_dynamic_conditions`
  2108 + ADD CONSTRAINT `permission_dynamic_conditions_ibfk_1` FOREIGN KEY (`permission_object_id`) REFERENCES `permission_objects` (`id`) ON DELETE CASCADE,
  2109 + ADD CONSTRAINT `permission_dynamic_conditions_ibfk_2` FOREIGN KEY (`group_id`) REFERENCES `groups_lookup` (`id`) ON DELETE CASCADE,
  2110 + ADD CONSTRAINT `permission_dynamic_conditions_ibfk_3` FOREIGN KEY (`condition_id`) REFERENCES `saved_searches` (`id`) ON DELETE CASCADE;
  2111 +
  2112 +--
2019 -- Constraints for table `permission_lookup_assignments` 2113 -- Constraints for table `permission_lookup_assignments`
2020 -- 2114 --
2021 ALTER TABLE `permission_lookup_assignments` 2115 ALTER TABLE `permission_lookup_assignments`
@@ -2024,6 +2118,12 @@ ALTER TABLE `permission_lookup_assignments` @@ -2024,6 +2118,12 @@ ALTER TABLE `permission_lookup_assignments`
2024 ADD CONSTRAINT `permission_lookup_assignments_ibfk_3` FOREIGN KEY (`permission_descriptor_id`) REFERENCES `permission_descriptors` (`id`) ON DELETE CASCADE; 2118 ADD CONSTRAINT `permission_lookup_assignments_ibfk_3` FOREIGN KEY (`permission_descriptor_id`) REFERENCES `permission_descriptors` (`id`) ON DELETE CASCADE;
2025 2119
2026 -- 2120 --
  2121 +-- Constraints for table `saved_searches`
  2122 +--
  2123 +ALTER TABLE `saved_searches`
  2124 + ADD CONSTRAINT `saved_searches_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
  2125 +
  2126 +--
2027 -- Constraints for table `workflow_states` 2127 -- Constraints for table `workflow_states`
2028 -- 2128 --
2029 ALTER TABLE `workflow_states` 2129 ALTER TABLE `workflow_states`
@@ -2034,14 +2134,17 @@ ALTER TABLE `workflow_states` @@ -2034,14 +2134,17 @@ ALTER TABLE `workflow_states`
2034 -- Constraints for table `workflow_transitions` 2134 -- Constraints for table `workflow_transitions`
2035 -- 2135 --
2036 ALTER TABLE `workflow_transitions` 2136 ALTER TABLE `workflow_transitions`
2037 - ADD CONSTRAINT `workflow_transitions_ibfk_26` FOREIGN KEY (`guard_group_id`) REFERENCES `groups_lookup` (`id`) ON DELETE SET NULL,  
2038 - ADD CONSTRAINT `workflow_transitions_ibfk_23` FOREIGN KEY (`workflow_id`) REFERENCES `workflows` (`id`) ON DELETE CASCADE,  
2039 - ADD CONSTRAINT `workflow_transitions_ibfk_24` FOREIGN KEY (`target_state_id`) REFERENCES `workflow_states` (`id`) ON DELETE CASCADE,  
2040 - ADD CONSTRAINT `workflow_transitions_ibfk_25` FOREIGN KEY (`guard_permission_id`) REFERENCES `permissions` (`id`) ON DELETE SET NULL,  
2041 - ADD CONSTRAINT `workflow_transitions_ibfk_27` FOREIGN KEY (`guard_role_id`) REFERENCES `roles` (`id`) ON DELETE SET NULL; 2137 + ADD CONSTRAINT `workflow_transitions_ibfk_45` FOREIGN KEY (`workflow_id`) REFERENCES `workflows` (`id`) ON DELETE CASCADE,
  2138 + ADD CONSTRAINT `workflow_transitions_ibfk_46` FOREIGN KEY (`target_state_id`) REFERENCES `workflow_states` (`id`) ON DELETE CASCADE,
  2139 + ADD CONSTRAINT `workflow_transitions_ibfk_47` FOREIGN KEY (`guard_permission_id`) REFERENCES `permissions` (`id`) ON DELETE SET NULL,
  2140 + ADD CONSTRAINT `workflow_transitions_ibfk_48` FOREIGN KEY (`guard_group_id`) REFERENCES `groups_lookup` (`id`) ON DELETE SET NULL,
  2141 + ADD CONSTRAINT `workflow_transitions_ibfk_49` FOREIGN KEY (`guard_role_id`) REFERENCES `roles` (`id`) ON DELETE SET NULL,
  2142 + ADD CONSTRAINT `workflow_transitions_ibfk_50` FOREIGN KEY (`guard_condition_id`) REFERENCES `saved_searches` (`id`) ON DELETE SET NULL;
2042 2143
2043 -- 2144 --
2044 -- Constraints for table `workflows` 2145 -- Constraints for table `workflows`
2045 -- 2146 --
2046 ALTER TABLE `workflows` 2147 ALTER TABLE `workflows`
2047 ADD CONSTRAINT `workflows_ibfk_1` FOREIGN KEY (`start_state_id`) REFERENCES `workflow_states` (`id`); 2148 ADD CONSTRAINT `workflows_ibfk_1` FOREIGN KEY (`start_state_id`) REFERENCES `workflow_states` (`id`);
  2149 +
  2150 +SET FOREIGN_KEY_CHECKS=1;