SearchKit - Add acl_bypass column to civicrm_search_display table
[civicrm-core.git] / ext / search_kit / sql / auto_install.sql
1 -- +--------------------------------------------------------------------+
2 -- | Copyright CiviCRM LLC. All rights reserved. |
3 -- | |
4 -- | This work is published under the GNU AGPLv3 license with some |
5 -- | permitted exceptions and without any warranty. For full license |
6 -- | and copyright information, see https://civicrm.org/licensing |
7 -- +--------------------------------------------------------------------+
8 --
9 -- Generated from schema.tpl
10 -- DO NOT EDIT. Generated by CRM_Core_CodeGen
11 --
12 -- /*******************************************************
13 -- *
14 -- * Clean up the existing tables - this section generated from drop.tpl
15 -- *
16 -- *******************************************************/
17
18 SET FOREIGN_KEY_CHECKS=0;
19
20 DROP TABLE IF EXISTS `civicrm_search_display`;
21
22 SET FOREIGN_KEY_CHECKS=1;
23 -- /*******************************************************
24 -- *
25 -- * Create new tables
26 -- *
27 -- *******************************************************/
28
29 -- /*******************************************************
30 -- *
31 -- * civicrm_search_display
32 -- *
33 -- * Search Kit - saved search displays
34 -- *
35 -- *******************************************************/
36 CREATE TABLE `civicrm_search_display` (
37 `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique SearchDisplay ID',
38 `name` varchar(255) NOT NULL COMMENT 'Unique name for identifying search display',
39 `label` varchar(255) NOT NULL COMMENT 'Label for identifying search display to administrators',
40 `saved_search_id` int unsigned NOT NULL COMMENT 'FK to saved search table.',
41 `type` varchar(128) NOT NULL COMMENT 'Type of display',
42 `settings` text DEFAULT NULL COMMENT 'Configuration data for the search display',
43 `acl_bypass` tinyint DEFAULT 0 COMMENT 'Skip permission checks and ACLs when running this display.',
44 PRIMARY KEY (`id`),
45 UNIQUE INDEX `UI_saved_search__id_name`(saved_search_id, name),
46 CONSTRAINT FK_civicrm_search_display_saved_search_id FOREIGN KEY (`saved_search_id`) REFERENCES `civicrm_saved_search`(`id`) ON DELETE CASCADE
47 )
48 ENGINE=InnoDB;