Commit 8b319b32a7132b141d9ed11eaff12fa2883ab4e5

Authored by rob
1 parent 1f0ec020

Added query to link folders to document types


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@1193 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing 1 changed file with 7 additions and 1 deletions
sql/tables.sql
... ... @@ -856,7 +856,13 @@ INSERT INTO folders (name, description, parent_id, creator_id, unit_id, is_publi
856 856 INSERT INTO folders (name, description, parent_id, creator_id, unit_id, is_public)
857 857 VALUES ("Burden of Disease", "Burden of Disease Unit Root Folder", 1, 1, 4, 0); -- id=5
858 858 -- unit admins have write access
859   - INSERT INTO groups_folders_link (group_id, folder_id, can_read, can_write) VALUES (5, 5, 0, 1);
  859 + INSERT INTO groups_folders_link (group_id, folder_id, can_read, can_write) VALUES (5, 5, 0, 1);
  860 +
  861 +-- link the folders to document types
  862 +INSERT INTO folder_doctypes_link (document_type_id, folder_id)
  863 + SELECT F.id, DTL.id
  864 + FROM folders AS F, document_types_lookup AS DTL;
  865 +
860 866  
861 867 -- TODO: populate categories_lookup
862 868  
... ...