Commit 6efc8214052c64022a1089ee3756824907f86e59

Authored by nbm
1 parent 27ff5010

Add permission_folder_id to the folder table, which provides us with a

link to the folder from which this folder gets its permissions - either
itself if it has permissions, or the folder from which it inherits its
permissions.


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@3118 c91229c3-7414-0410-bfa2-8a42b809f60b
sql/mysql/install/tables.sql
@@ -383,10 +383,12 @@ CREATE TABLE folders ( @@ -383,10 +383,12 @@ CREATE TABLE folders (
383 parent_folder_ids text, 383 parent_folder_ids text,
384 full_path text, 384 full_path text,
385 inherit_parent_folder_permission int(11) default NULL, 385 inherit_parent_folder_permission int(11) default NULL,
  386 + permission_folder_id int(11) default NULL,
386 UNIQUE KEY id (id), 387 UNIQUE KEY id (id),
387 KEY fk_parent_id (parent_id), 388 KEY fk_parent_id (parent_id),
388 KEY fk_creator_id (creator_id), 389 KEY fk_creator_id (creator_id),
389 - KEY fk_unit_id (unit_id) 390 + KEY fk_unit_id (unit_id),
  391 + KEY permission_folder_id (permission_folder_id)
390 ) TYPE=InnoDB; 392 ) TYPE=InnoDB;
391 393
392 -- -------------------------------------------------------- 394 -- --------------------------------------------------------
sql/mysql/upgrade/1.2.4-to-1.2.5.sql
@@ -413,3 +413,6 @@ CREATE TABLE `zseq_browse_criteria` ( @@ -413,3 +413,6 @@ CREATE TABLE `zseq_browse_criteria` (
413 ) TYPE=MyISAM; 413 ) TYPE=MyISAM;
414 414
415 INSERT INTO `zseq_browse_criteria` SELECT MAX(`id`) FROM `browse_criteria`; 415 INSERT INTO `zseq_browse_criteria` SELECT MAX(`id`) FROM `browse_criteria`;
  416 +
  417 +ALTER TABLE `folders` ADD `permission_folder_id` INT;
  418 +ALTER TABLE `folders` ADD INDEX ( `permission_folder_id` ) ;