IP : 3.142.98.4Hostname : host45.registrar-servers.comKernel : Linux host45.registrar-servers.com 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64Disable Function : None :) OS : Linux
PATH:
/
home/
../
var/
lib/
../
softaculous/
redax/
../
piwik/
../
moodle44/
../
yeti/
yeti.sql/
/
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00";
/*!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 */;
-- -- Table structure for table `com_vtiger_workflowtasks` --
CREATE TABLE `com_vtiger_workflowtasks` ( `task_id` int NOT NULL AUTO_INCREMENT, `workflow_id` int DEFAULT NULL, `summary` varchar(400) NOT NULL, `task` text, `sequence` smallint unsigned DEFAULT '0', PRIMARY KEY (`task_id`), KEY `workflow_id` (`workflow_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 AUTO_INCREMENT=149 ;
-- -- Dumping data for table `com_vtiger_workflowtasks` --
INSERT INTO `com_vtiger_workflowtasks` VALUES (108, 31, 'Notify Owner On Ticket Create', 'O:19:"VTEmailTemplateTask":10:{s:18:"executeImmediately";b:1;s:10:"workflowId";s:2:"31";s:7:"summary";s:29:"Notify Owner On Ticket Create";s:6:"active";b:0;s:7:"trigger";N;s:8:"template";s:2:"43";s:11:"attachments";s:0:"";s:5:"email";s:49:"$(relatedRecord : assigned_user_id|email1|Users)$";s:10:"copy_email";s:0:"";s:2:"id";i:108;}', 0), (119, 14, 'Notification Email to Record Owner', 'O:19:"VTEmailTemplateTask":10:{s:18:"executeImmediately";b:1;s:10:"workflowId";s:2:"14";s:7:"summary";s:34:"Notification Email to Record Owner";s:6:"active";b:0;s:7:"trigger";N;s:8:"template";s:2:"46";s:11:"attachments";s:0:"";s:5:"email";s:49:"$(relatedRecord : assigned_user_id|email1|Users)$";s:10:"copy_email";s:0:"";s:2:"id";i:119;}', 0), (120, 53, 'Send Customer Login Details', 'O:19:"VTEmailTemplateTask":11:{s:18:"executeImmediately";b:1;s:8:"contents";N;s:10:"workflowId";s:2:"53";s:7:"summary";s:27:"Send Customer Login Details";s:6:"active";b:0;s:7:"trigger";N;s:8:"template";s:2:"44";s:11:"attachments";s:0:"";s:5:"email";s:18:"$(record : email)$";s:10:"copy_email";s:0:"";s:2:"id";i:120;}', 0), (123, 55, 'Generate mail address book', 'O:17:"VTAddressBookTask":7:{s:18:"executeImmediately";b:0;s:10:"workflowId";s:2:"55";s:7:"summary";s:26:"Generate mail address book";s:6:"active";b:1;s:7:"trigger";N;s:4:"test";s:0:"";s:2:"id";i:123;}', 0), (133, 26, 'Notify Contact On Ticket Change', 'O:18:"VTEntityMethodTask":7:{s:18:"executeImmediately";b:1;s:10:"workflowId";s:2:"26";s:7:"summary";s:31:"Notify Contact On Ticket Change";s:6:"active";b:0;s:7:"trigger";N;s:10:"methodName";s:28:"helpDeskChangeNotifyContacts";s:2:"id";i:133;}', 0), (134, 29, 'Notify contacts about closing of ticket.', 'O:18:"VTEntityMethodTask":7:{s:18:"executeImmediately";b:1;s:10:"workflowId";s:2:"29";s:7:"summary";s:40:"Notify contacts about closing of ticket.";s:6:"active";b:0;s:7:"trigger";N;s:10:"methodName";s:28:"helpDeskClosedNotifyContacts";s:2:"id";i:134;}', 0), (135, 59, 'Notify Contact On New comment added to ticket', 'O:18:"VTEntityMethodTask":7:{s:18:"executeImmediately";b:1;s:10:"workflowId";i:59;s:7:"summary";s:45:"Notify Contact On New comment added to ticket";s:6:"active";b:0;s:7:"trigger";N;s:10:"methodName";s:26:"helpDeskNewCommentContacts";s:2:"id";i:135;}', 0), (136, 58, 'Notify Account On New comment added to ticket', 'O:18:"VTEntityMethodTask":7:{s:18:"executeImmediately";b:1;s:10:"workflowId";i:58;s:7:"summary";s:45:"Notify Account On New comment added to ticket";s:6:"active";b:0;s:7:"trigger";N;s:10:"methodName";s:25:"helpDeskNewCommentAccount";s:2:"id";i:136;}', 0), (137, 57, 'Notify Owner On new comment added to ticket from portal', 'O:18:"VTEntityMethodTask":7:{s:18:"executeImmediately";b:1;s:10:"workflowId";i:57;s:7:"summary";s:55:"Notify Owner On new comment added to ticket from portal";s:6:"active";b:0;s:7:"trigger";N;s:10:"methodName";s:23:"helpDeskNewCommentOwner";s:2:"id";i:137;}', 0), (138, 69, 'Update working time', 'O:16:"VTUpdateWorkTime":6:{s:18:"executeImmediately";b:0;s:10:"workflowId";i:69;s:7:"summary";s:19:"Update working time";s:6:"active";b:1;s:7:"trigger";N;s:2:"id";i:138;}', 0), (139, 70, 'New user created', 'O:18:"VTEntityMethodTask":8:{s:18:"executeImmediately";b:1;s:8:"contents";N;s:10:"workflowId";i:70;s:7:"summary";s:16:"New user created";s:6:"active";b:0;s:7:"trigger";N;s:10:"methodName";s:7:"newUser";s:2:"id";i:139;}', 0), (140, 71, 'It sums up all open sales orders', 'O:21:"SumFieldFromDependent":10:{s:18:"executeImmediately";b:1;s:8:"contents";N;s:10:"workflowId";i:71;s:7:"summary";s:32:"It sums up all open sales orders";s:6:"active";b:1;s:7:"trigger";N;s:11:"targetField";s:36:"accountid::Accounts::sum_open_orders";s:11:"sourceField";s:9:"sum_gross";s:10:"conditions";a:2:{s:9:"condition";s:2:"OR";s:5:"rules";a:2:{i:0;a:3:{s:9:"fieldname";s:34:"ssingleorders_status:SSingleOrders";s:8:"operator";s:1:"e";s:5:"value";s:43:"PLL_NEW##PLL_PAYMENT_REVIEW##PLL_PROCESSING";}i:1;a:3:{s:9:"fieldname";s:34:"ssingleorders_status:SSingleOrders";s:8:"operator";s:1:"y";s:5:"value";s:0:"";}}}s:2:"id";i:140;}', 0), (141, 72, 'It sums up all open sales orders', 'O:21:"SumFieldFromDependent":10:{s:18:"executeImmediately";b:1;s:8:"contents";N;s:10:"workflowId";i:72;s:7:"summary";s:32:"It sums up all open sales orders";s:6:"active";b:1;s:7:"trigger";N;s:11:"targetField";s:36:"accountid::Accounts::sum_open_orders";s:11:"sourceField";s:9:"sum_gross";s:10:"conditions";a:2:{s:9:"condition";s:2:"OR";s:5:"rules";a:2:{i:0;a:3:{s:9:"fieldname";s:34:"ssingleorders_status:SSingleOrders";s:8:"operator";s:1:"e";s:5:"value";s:43:"PLL_NEW##PLL_PAYMENT_REVIEW##PLL_PROCESSING";}i:1;a:3:{s:9:"fieldname";s:34:"ssingleorders_status:SSingleOrders";s:8:"operator";s:1:"y";s:5:"value";s:0:"";}}}s:2:"id";i:141;}', 0), (142, 73, 'Create IGDN', 'O:18:"VTCreateEntityTask":11:{s:18:"executeImmediately";b:1;s:8:"contents";N;s:10:"workflowId";i:73;s:7:"summary";s:11:"Create IGDN";s:6:"active";b:0;s:7:"trigger";N;s:11:"entity_type";s:4:"IGDN";s:15:"reference_field";s:15:"ssingleordersid";s:19:"field_value_mapping";s:94:"[{"fieldname":"igdn_status","value":"PLL_ACCEPTED","valuetype":"rawtext","modulename":"IGDN"}]";s:12:"mappingPanel";s:1:"1";s:2:"id";i:142;}', 0), (148, 77, 'Cancel IGDN', 'O:24:"VTUpdateRelatedFieldTask":8:{s:18:"executeImmediately";b:0;s:8:"contents";N;s:10:"workflowId";i:77;s:7:"summary";s:11:"Cancel IGDN";s:6:"active";b:0;s:7:"trigger";N;s:19:"field_value_mapping";s:81:"[{"fieldname":"IGDN::igdn_status","value":"PLL_CANCELLED","valuetype":"rawtext"}]";s:2:"id";i:148;}', 0);
-- -- Table structure for table `com_vtiger_workflow_activatedonce` --
CREATE TABLE `com_vtiger_workflow_activatedonce` ( `workflow_id` int NOT NULL, `entity_id` int NOT NULL, PRIMARY KEY (`workflow_id`,`entity_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
-- -- Table structure for table `dav_addressbookchanges` --
CREATE TABLE `dav_addressbookchanges` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `uri` varbinary(200) NOT NULL, `synctoken` int unsigned NOT NULL, `addressbookid` int unsigned NOT NULL, `operation` tinyint(1) NOT NULL, PRIMARY KEY (`id`), KEY `addressbookid_synctoken` (`addressbookid`,`synctoken`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- -- Table structure for table `dav_calendarchanges` --
CREATE TABLE `dav_calendarchanges` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `uri` varbinary(200) NOT NULL, `synctoken` int unsigned NOT NULL, `calendarid` int unsigned NOT NULL, `operation` tinyint(1) NOT NULL, PRIMARY KEY (`id`), KEY `calendarid_synctoken` (`calendarid`,`synctoken`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- -- Table structure for table `l_yf_settings_tracker_detail` --
CREATE TABLE `l_yf_settings_tracker_detail` ( `id` int unsigned NOT NULL, `prev_value` text NOT NULL, `post_value` text NOT NULL, `field` varchar(255) NOT NULL, KEY `id` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
-- -- Table structure for table `l_yf_switch_users` --
CREATE TABLE `l_yf_switch_users` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `date` datetime NOT NULL, `status` varchar(10) NOT NULL, `baseid` int NOT NULL, `destid` int NOT NULL, `busername` varchar(50) NOT NULL, `dusername` varchar(50) NOT NULL, `ip` varchar(100) NOT NULL, `agent` varchar(500) NOT NULL, PRIMARY KEY (`id`), KEY `baseid` (`baseid`), KEY `destid` (`destid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
-- -- Table structure for table `o_yf_access_for_admin` --
CREATE TABLE `o_yf_access_for_admin` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `username` varchar(50) NOT NULL, `date` datetime NOT NULL, `ip` varchar(100) NOT NULL, `module` varchar(30) NOT NULL, `url` varchar(300) NOT NULL, `agent` varchar(500) NOT NULL, `request` text NOT NULL, `referer` varchar(300) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
-- -- Table structure for table `o_yf_access_for_api` --
CREATE TABLE `o_yf_access_for_api` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `username` varchar(50) NOT NULL, `date` datetime NOT NULL, `ip` varchar(100) NOT NULL, `url` varchar(300) NOT NULL, `agent` varchar(500) NOT NULL, `request` text NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
-- -- Table structure for table `o_yf_access_to_record` --
CREATE TABLE `o_yf_access_to_record` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `username` varchar(50) NOT NULL, `date` datetime NOT NULL, `ip` varchar(100) NOT NULL, `record` int NOT NULL, `module` varchar(30) NOT NULL, `url` varchar(300) NOT NULL, `agent` varchar(500) NOT NULL, `request` text NOT NULL, `referer` varchar(300) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
-- -- Table structure for table `roundcube_cache_messages` --
CREATE TABLE `roundcube_cache_messages` ( `user_id` int unsigned NOT NULL, `mailbox` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL, `uid` int unsigned NOT NULL DEFAULT '0', `expires` datetime DEFAULT NULL, `data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `flags` int NOT NULL DEFAULT '0', PRIMARY KEY (`user_id`,`mailbox`,`uid`), KEY `expires_index` (`expires`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC;
-- -- Table structure for table `roundcube_contacts` --
CREATE TABLE `roundcube_contacts` ( `contact_id` int unsigned NOT NULL AUTO_INCREMENT, `changed` datetime NOT NULL DEFAULT '1000-01-01 00:00:00', `del` tinyint(1) NOT NULL DEFAULT '0', `name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', `email` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `firstname` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', `surname` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', `vcard` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `words` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `user_id` int unsigned NOT NULL, PRIMARY KEY (`contact_id`), KEY `roundcube_user_contacts_index` (`user_id`,`del`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC;
-- -- Table structure for table `roundcube_filestore` --
CREATE TABLE `roundcube_filestore` ( `file_id` int unsigned NOT NULL AUTO_INCREMENT, `user_id` int unsigned NOT NULL, `context` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `filename` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `mtime` int NOT NULL, `data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, PRIMARY KEY (`file_id`), UNIQUE KEY `uniqueness` (`user_id`,`context`,`filename`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC;
-- -- Table structure for table `roundcube_identities` --
CREATE TABLE `roundcube_identities` ( `identity_id` int unsigned NOT NULL AUTO_INCREMENT, `user_id` int unsigned NOT NULL, `changed` datetime NOT NULL DEFAULT '1000-01-01 00:00:00', `del` tinyint(1) NOT NULL DEFAULT '0', `standard` tinyint(1) NOT NULL DEFAULT '0', `name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `organization` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', `email` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `reply-to` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', `bcc` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', `signature` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `html_signature` tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`identity_id`), KEY `user_identities_index` (`user_id`,`del`), KEY `email_identities_index` (`email`,`del`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC;
-- -- Table structure for table `roundcube_responses` --
CREATE TABLE `roundcube_responses` ( `response_id` int unsigned NOT NULL AUTO_INCREMENT, `user_id` int unsigned NOT NULL, `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `is_html` tinyint(1) NOT NULL DEFAULT '0', `changed` datetime NOT NULL DEFAULT '1000-01-01 00:00:00', `del` tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`response_id`), KEY `user_responses_index` (`user_id`,`del`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC;
-- -- Table structure for table `roundcube_searches` --
CREATE TABLE `roundcube_searches` ( `search_id` int unsigned NOT NULL AUTO_INCREMENT, `user_id` int unsigned NOT NULL, `type` int NOT NULL DEFAULT '0', `name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `data` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, PRIMARY KEY (`search_id`), UNIQUE KEY `uniqueness` (`user_id`,`type`,`name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC;
-- -- Table structure for table `roundcube_session` --
CREATE TABLE `roundcube_session` ( `sess_id` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `changed` datetime NOT NULL DEFAULT '1000-01-01 00:00:00', `ip` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `vars` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, PRIMARY KEY (`sess_id`), KEY `changed_index` (`changed`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC;
-- -- Table structure for table `s_yf_batchmethod` --
CREATE TABLE `s_yf_batchmethod` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `method` varchar(255) NOT NULL, `params` text NOT NULL, `created_time` datetime NOT NULL, `status` tinyint unsigned NOT NULL, `userid` int DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 AUTO_INCREMENT=2 ;
-- -- Dumping data for table `s_yf_batchmethod` --
INSERT INTO `s_yf_batchmethod` VALUES (1, '\\App\\PrivilegeUtil::recalculateSharingRulesByUser', '[1]', '[[regtime]]', 1, 0);
-- -- Table structure for table `s_yf_calendar_sources` --
CREATE TABLE `s_yf_calendar_sources` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `label` varchar(100) DEFAULT NULL, `base_module` smallint NOT NULL, `target_module` smallint NOT NULL, `user_id` int NOT NULL, `type` tinyint unsigned NOT NULL DEFAULT '1', `public` tinyint unsigned NOT NULL DEFAULT '0', `include_filters` tinyint unsigned NOT NULL DEFAULT '0', `color` varchar(10) DEFAULT NULL, `custom_view` int unsigned NOT NULL DEFAULT '0', `field_label` int NOT NULL DEFAULT '0', `fieldid_a_date` int NOT NULL, `fieldid_a_time` int NOT NULL DEFAULT '0', `fieldid_b_date` int NOT NULL DEFAULT '0', `fieldid_b_time` int NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `base_module` (`base_module`), KEY `target_module` (`target_module`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
-- -- Table structure for table `s_yf_smsnotifier_queue` --
CREATE TABLE `s_yf_smsnotifier_queue` ( `id` int NOT NULL AUTO_INCREMENT, `message` varchar(500) NOT NULL, `tonumbers` text NOT NULL, `records` text NOT NULL, `module` varchar(30) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
CREATE TABLE `s_yf_tokens` ( `uid` char(64) NOT NULL, `method` varchar(255) NOT NULL, `params` text NOT NULL, `created_by_user` int NOT NULL, `created_date` datetime NOT NULL, `expiration_date` datetime DEFAULT NULL, `one_time_use` tinyint unsigned NOT NULL, PRIMARY KEY (`uid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
-- -- Table structure for table `u_yf_chat_messages_private` --
CREATE TABLE `u_yf_chat_messages_private` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `privateid` int unsigned NOT NULL, `userid` smallint unsigned NOT NULL, `created` datetime DEFAULT NULL, `messages` text NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
-- -- Table structure for table `u_yf_chat_rooms_private` --
CREATE TABLE `u_yf_chat_rooms_private` ( `roomid` int unsigned NOT NULL AUTO_INCREMENT, `userid` int NOT NULL, `private_room_id` int unsigned NOT NULL, `last_message` int unsigned DEFAULT NULL, PRIMARY KEY (`roomid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
-- -- Table structure for table `u_yf_crmentity_rel_tree` --
CREATE TABLE `u_yf_crmentity_rel_tree` ( `crmid` int NOT NULL, `module` int NOT NULL, `tree` varchar(50) NOT NULL, `relmodule` int NOT NULL, `rel_created_user` int NOT NULL, `rel_created_time` datetime NOT NULL, `rel_comment` varchar(255) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
-- -- Table structure for table `u_yf_mail_address_book` --
CREATE TABLE `u_yf_mail_address_book` ( `id` int NOT NULL, `email` varchar(100) NOT NULL, `name` varchar(255) NOT NULL, `users` text NOT NULL, KEY `email` (`email`,`name`), KEY `id` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
-- -- Table structure for table `u_yf_modtracker_inv` --
CREATE TABLE `u_yf_modtracker_inv` ( `id` int unsigned NOT NULL, `changes` text NOT NULL, KEY `u_yf_modtracker_inv_id_idx` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
-- -- Table structure for table `u_yf_openstreetmap_record_updater` --
CREATE TABLE `u_yf_openstreetmap_record_updater` ( `crmid` int NOT NULL, `type` char(1) NOT NULL, `address` text NOT NULL, KEY `crmid` (`crmid`,`type`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
-- -- Table structure for table `vtiger_activity_reminder` --
CREATE TABLE `vtiger_activity_reminder` ( `activity_id` int NOT NULL, `reminder_time` int NOT NULL, `reminder_sent` int NOT NULL, PRIMARY KEY (`activity_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
-- -- Table structure for table `vtiger_activity_reminder_popup` --
CREATE TABLE `vtiger_activity_reminder_popup` ( `reminderid` int NOT NULL AUTO_INCREMENT, `recordid` int NOT NULL, `datetime` datetime NOT NULL, `status` int NOT NULL, PRIMARY KEY (`reminderid`), KEY `recordid` (`recordid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 AUTO_INCREMENT=1 ;
-- -- Table structure for table `vtiger_activity_update_dates` --
CREATE TABLE `vtiger_activity_update_dates` ( `activityid` int NOT NULL, `parent` int NOT NULL, `task_id` int NOT NULL, PRIMARY KEY (`activityid`), KEY `parent` (`parent`), KEY `vtiger_activity_update_dates_ibfk_1` (`task_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
-- -- Table structure for table `vtiger_convertleadmapping` --
CREATE TABLE `vtiger_convertleadmapping` ( `cfmid` int NOT NULL AUTO_INCREMENT, `leadfid` int NOT NULL, `accountfid` int DEFAULT NULL, `editable` int DEFAULT '1', PRIMARY KEY (`cfmid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 AUTO_INCREMENT=45 ;
-- -- Dumping data for table `vtiger_convertleadmapping` --
INSERT INTO `vtiger_groups` VALUES (2, 'Team Selling', 'Group Related to Sales', '#E6FAD8', 0), (3, 'Marketing Group', 'Group Related to Marketing Activities', '#E6FAD8', 0), (4, 'Support Group', 'Group Related to providing Support to Customers', '#E6FAD8', 0);
-- -- Table structure for table `vtiger_import_locks` --
CREATE TABLE `vtiger_import_locks` ( `vtiger_import_lock_id` int unsigned NOT NULL AUTO_INCREMENT, `userid` int NOT NULL, `tabid` smallint NOT NULL, `importid` int NOT NULL, `locked_since` datetime DEFAULT NULL, PRIMARY KEY (`vtiger_import_lock_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
-- -- Table structure for table `vtiger_inventorysubproductrel` --
CREATE TABLE `vtiger_inventorysubproductrel` ( `id` int NOT NULL, `sequence_no` int NOT NULL, `productid` int NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
-- -- Table structure for table `vtiger_ossmailview_files` --
CREATE TABLE `vtiger_ossmailview_files` ( `ossmailviewid` int NOT NULL, `documentsid` int NOT NULL, `attachmentsid` int NOT NULL, KEY `fk_1_vtiger_ossmailview_files` (`ossmailviewid`), KEY `documentsid` (`documentsid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
-- -- Table structure for table `vtiger_publicholiday` --
CREATE TABLE `vtiger_publicholiday` ( `publicholidayid` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'id of public holiday', `holidaydate` date NOT NULL COMMENT 'date of holiday', `holidayname` varchar(255) NOT NULL COMMENT 'name of holiday', `holidaytype` varchar(25) DEFAULT NULL COMMENT 'type of holiday', PRIMARY KEY (`publicholidayid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
-- -- Table structure for table `vtiger_sharedcalendar` --
CREATE TABLE `vtiger_sharedcalendar` ( `userid` int NOT NULL, `sharedid` int NOT NULL, PRIMARY KEY (`userid`,`sharedid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
-- -- Table structure for table `vtiger_tmp_read_group_rel_sharing_per` --
CREATE TABLE `vtiger_tmp_read_group_rel_sharing_per` ( `userid` int NOT NULL, `tabid` smallint NOT NULL, `relatedtabid` int NOT NULL, `sharedgroupid` int NOT NULL, PRIMARY KEY (`userid`,`tabid`,`relatedtabid`,`sharedgroupid`), KEY `tmp_read_group_rel_sharing_per_userid_sharedgroupid_tabid` (`userid`,`sharedgroupid`,`tabid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
-- -- Table structure for table `vtiger_tmp_read_user_rel_sharing_per` --
CREATE TABLE `vtiger_tmp_read_user_rel_sharing_per` ( `userid` int NOT NULL, `tabid` smallint NOT NULL, `relatedtabid` int NOT NULL, `shareduserid` int NOT NULL, PRIMARY KEY (`userid`,`tabid`,`relatedtabid`,`shareduserid`), KEY `tmp_read_user_rel_sharing_per_userid_shared_reltabid_idx` (`userid`,`shareduserid`,`relatedtabid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
-- -- Table structure for table `vtiger_tmp_write_group_rel_sharing_per` --
CREATE TABLE `vtiger_tmp_write_group_rel_sharing_per` ( `userid` int NOT NULL, `tabid` smallint NOT NULL, `relatedtabid` int NOT NULL, `sharedgroupid` int NOT NULL, PRIMARY KEY (`userid`,`tabid`,`relatedtabid`,`sharedgroupid`), KEY `tmp_write_group_rel_sharing_per_userid_sharedgroupid_tabid_idx` (`userid`,`sharedgroupid`,`tabid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
-- -- Table structure for table `vtiger_tmp_write_user_rel_sharing_per` --
CREATE TABLE `vtiger_tmp_write_user_rel_sharing_per` ( `userid` int NOT NULL, `tabid` smallint NOT NULL, `relatedtabid` int NOT NULL, `shareduserid` int NOT NULL, PRIMARY KEY (`userid`,`tabid`,`relatedtabid`,`shareduserid`), KEY `tmp_write_user_rel_sharing_per_userid_sharduserid_tabid_idx` (`userid`,`shareduserid`,`tabid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
-- -- Table structure for table `yetiforce_currencyupdate` --
CREATE TABLE `yetiforce_currencyupdate` ( `id` int NOT NULL AUTO_INCREMENT, `currency_id` int NOT NULL, `fetch_date` date NOT NULL, `exchange_date` date NOT NULL, `exchange` decimal(19,9) NOT NULL, `bank_id` int NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `fetchdate_currencyid_unique` (`currency_id`,`exchange_date`,`bank_id`), KEY `fk_1_vtiger_osscurrencies` (`currency_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
-- -- Constraints for table `a_yf_bruteforce_users` -- ALTER TABLE `a_yf_bruteforce_users` ADD CONSTRAINT `fk_1_vtiger_bruteforce_users` FOREIGN KEY (`id`) REFERENCES `vtiger_users` (`id`) ON DELETE CASCADE;
-- -- Constraints for table `a_yf_mapped_fields` -- ALTER TABLE `a_yf_mapped_fields` ADD CONSTRAINT `a_yf_mapped_fields_ibfk_1` FOREIGN KEY (`mappedid`) REFERENCES `a_yf_mapped_config` (`id`) ON DELETE CASCADE;
-- -- Constraints for table `a_yf_modules_packages` -- ALTER TABLE `a_yf_modules_packages` ADD CONSTRAINT `a_yf_modules_packages_module_fk` FOREIGN KEY (`module_id`) REFERENCES `vtiger_tab` (`tabid`) ON DELETE CASCADE, ADD CONSTRAINT `a_yf_modules_packages_package_fk` FOREIGN KEY (`package_id`) REFERENCES `a_yf_module_package` (`id`) ON DELETE CASCADE;
-- -- Constraints for table `a_yf_module_reference` -- ALTER TABLE `a_yf_module_reference` ADD CONSTRAINT `fk_module_relations_entityname` FOREIGN KEY (`module_id`) REFERENCES `vtiger_entityname` (`tabid`) ON DELETE CASCADE;
-- -- Constraints for table `a_yf_record_converter` -- ALTER TABLE `a_yf_record_converter` ADD CONSTRAINT `fk_1_a_yf_record_converter` FOREIGN KEY (`source_module`) REFERENCES `vtiger_tab` (`tabid`) ON DELETE CASCADE;
-- -- Constraints for table `a_yf_record_converter_mapping` -- ALTER TABLE `a_yf_record_converter_mapping` ADD CONSTRAINT `a_yf_record_converter_mapping_fk1` FOREIGN KEY (`id`) REFERENCES `a_yf_record_converter` (`id`) ON DELETE CASCADE, ADD CONSTRAINT `a_yf_record_converter_mapping_fk2` FOREIGN KEY (`source_field`) REFERENCES `vtiger_field` (`fieldid`) ON DELETE CASCADE, ADD CONSTRAINT `a_yf_record_converter_mapping_fk3` FOREIGN KEY (`dest_field`) REFERENCES `vtiger_field` (`fieldid`) ON DELETE CASCADE;
-- -- Constraints for table `a_yf_record_list_filter` -- ALTER TABLE `a_yf_record_list_filter` ADD CONSTRAINT `a_yf_record_list_filter_dest_relationid_idx` FOREIGN KEY (`dest_relationid`) REFERENCES `vtiger_relatedlists` (`relation_id`) ON DELETE CASCADE, ADD CONSTRAINT `a_yf_record_list_filter_rel_relationid_idx` FOREIGN KEY (`rel_relationid`) REFERENCES `vtiger_relatedlists` (`relation_id`) ON DELETE CASCADE, ADD CONSTRAINT `a_yf_record_list_filter_relationid_idx` FOREIGN KEY (`relationid`) REFERENCES `vtiger_relatedlists` (`relation_id`) ON DELETE CASCADE;
-- -- Constraints for table `a_yf_relatedlists_inv_fields` -- ALTER TABLE `a_yf_relatedlists_inv_fields` ADD CONSTRAINT `a_yf_relatedlists_inv_fields_ibfk_1` FOREIGN KEY (`relation_id`) REFERENCES `vtiger_relatedlists` (`relation_id`) ON DELETE CASCADE;
-- -- Constraints for table `a_yf_relatedlists_widgets` -- ALTER TABLE `a_yf_relatedlists_widgets` ADD CONSTRAINT `a_yf_relatedlists_widgets_ibfk_1` FOREIGN KEY (`relation_id`) REFERENCES `vtiger_relatedlists` (`relation_id`) ON DELETE CASCADE;
-- -- Constraints for table `a_yf_settings_access` -- ALTER TABLE `a_yf_settings_access` ADD CONSTRAINT `a_yf_settings_access_module_id_fk` FOREIGN KEY (`module_id`) REFERENCES `a_yf_settings_modules` (`id`) ON DELETE CASCADE, ADD CONSTRAINT `a_yf_settings_access_user_fk` FOREIGN KEY (`user`) REFERENCES `vtiger_users` (`id`) ON DELETE CASCADE;
-- -- Constraints for table `com_vtiger_workflowtasks` -- ALTER TABLE `com_vtiger_workflowtasks` ADD CONSTRAINT `com_vtiger_workflowtasks_ibfk_1` FOREIGN KEY (`workflow_id`) REFERENCES `com_vtiger_workflows` (`workflow_id`) ON DELETE CASCADE;
-- -- Constraints for table `dav_addressbooks` -- ALTER TABLE `dav_addressbooks` ADD CONSTRAINT `dav_addressbooks_ibfk_1` FOREIGN KEY (`principaluri`) REFERENCES `dav_principals` (`uri`) ON DELETE CASCADE;
-- -- Constraints for table `dav_calendarobjects` -- ALTER TABLE `dav_calendarobjects` ADD CONSTRAINT `dav_calendarobjects_ibfk_1` FOREIGN KEY (`calendarid`) REFERENCES `dav_calendars` (`id`) ON DELETE CASCADE;
-- -- Constraints for table `dav_cards` -- ALTER TABLE `dav_cards` ADD CONSTRAINT `dav_cards_ibfk_1` FOREIGN KEY (`addressbookid`) REFERENCES `dav_addressbooks` (`id`) ON DELETE CASCADE;
-- -- Constraints for table `dav_users` -- ALTER TABLE `dav_users` ADD CONSTRAINT `fk_dav_users` FOREIGN KEY (`userid`) REFERENCES `vtiger_users` (`id`) ON DELETE CASCADE;
-- -- Constraints for table `i_yf_auth` -- ALTER TABLE `i_yf_auth` ADD CONSTRAINT `i_yf_auth_chk_1` CHECK (json_valid(`config`));
-- -- Constraints for table `i_yf_magento_config` -- ALTER TABLE `i_yf_magento_config` ADD CONSTRAINT `i_yf_magento_config_ibfk_1` FOREIGN KEY (`server_id`) REFERENCES `i_yf_magento_servers` (`id`) ON DELETE CASCADE;
-- -- Constraints for table `l_yf_api_login_history` -- ALTER TABLE `l_yf_api_login_history` ADD CONSTRAINT `l_yf_api_login_history_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `w_yf_api_user` (`id`) ON DELETE CASCADE;
-- -- Constraints for table `l_yf_portal_login_history` -- ALTER TABLE `l_yf_portal_login_history` ADD CONSTRAINT `l_yf_portal_login_history_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `w_yf_portal_user` (`id`) ON DELETE CASCADE;
-- -- Constraints for table `roundcube_cache` -- ALTER TABLE `roundcube_cache` ADD CONSTRAINT `roundcube_user_id_fk_cache` FOREIGN KEY (`user_id`) REFERENCES `roundcube_users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;
-- -- Constraints for table `roundcube_cache_index` -- ALTER TABLE `roundcube_cache_index` ADD CONSTRAINT `roundcube_user_id_fk_cache_index` FOREIGN KEY (`user_id`) REFERENCES `roundcube_users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;
-- -- Constraints for table `roundcube_cache_messages` -- ALTER TABLE `roundcube_cache_messages` ADD CONSTRAINT `roundcube_user_id_fk_cache_messages` FOREIGN KEY (`user_id`) REFERENCES `roundcube_users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;
-- -- Constraints for table `roundcube_cache_thread` -- ALTER TABLE `roundcube_cache_thread` ADD CONSTRAINT `roundcube_user_id_fk_cache_thread` FOREIGN KEY (`user_id`) REFERENCES `roundcube_users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;
-- -- Constraints for table `roundcube_contactgroupmembers` -- ALTER TABLE `roundcube_contactgroupmembers` ADD CONSTRAINT `roundcube_contact_id_fk_contacts` FOREIGN KEY (`contact_id`) REFERENCES `roundcube_contacts` (`contact_id`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `roundcube_contactgroup_id_fk_contactgroups` FOREIGN KEY (`contactgroup_id`) REFERENCES `roundcube_contactgroups` (`contactgroup_id`) ON DELETE CASCADE ON UPDATE CASCADE;
-- -- Constraints for table `roundcube_contactgroups` -- ALTER TABLE `roundcube_contactgroups` ADD CONSTRAINT `roundcube_user_id_fk_contactgroups` FOREIGN KEY (`user_id`) REFERENCES `roundcube_users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;
-- -- Constraints for table `roundcube_contacts` -- ALTER TABLE `roundcube_contacts` ADD CONSTRAINT `roundcube_user_id_fk_contacts` FOREIGN KEY (`user_id`) REFERENCES `roundcube_users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;
-- -- Constraints for table `roundcube_dictionary` -- ALTER TABLE `roundcube_dictionary` ADD CONSTRAINT `roundcube_user_id_fk_dictionary` FOREIGN KEY (`user_id`) REFERENCES `roundcube_users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;
-- -- Constraints for table `roundcube_filestore` -- ALTER TABLE `roundcube_filestore` ADD CONSTRAINT `user_id_fk_filestore` FOREIGN KEY (`user_id`) REFERENCES `roundcube_users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;
-- -- Constraints for table `roundcube_identities` -- ALTER TABLE `roundcube_identities` ADD CONSTRAINT `roundcube_user_id_fk_identities` FOREIGN KEY (`user_id`) REFERENCES `roundcube_users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;
-- -- Constraints for table `roundcube_responses` -- ALTER TABLE `roundcube_responses` ADD CONSTRAINT `user_id_fk_responses` FOREIGN KEY (`user_id`) REFERENCES `roundcube_users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;
-- -- Constraints for table `roundcube_searches` -- ALTER TABLE `roundcube_searches` ADD CONSTRAINT `roundcube_user_id_fk_searches` FOREIGN KEY (`user_id`) REFERENCES `roundcube_users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;
-- -- Constraints for table `roundcube_users_autologin` -- ALTER TABLE `roundcube_users_autologin` ADD CONSTRAINT `roundcube_users_autologin_ibfk_1` FOREIGN KEY (`rcuser_id`) REFERENCES `s_yf_mail_account` (`id`) ON DELETE CASCADE;
-- -- Constraints for table `s_yf_auto_assign` -- ALTER TABLE `s_yf_auto_assign` ADD CONSTRAINT `s_yf_auto_assign_tabid_fk` FOREIGN KEY (`tabid`) REFERENCES `vtiger_tab` (`tabid`) ON DELETE CASCADE;
-- -- Constraints for table `s_yf_auto_assign_groups` -- ALTER TABLE `s_yf_auto_assign_groups` ADD CONSTRAINT `s_yf_auto_assign_groups_id_fk` FOREIGN KEY (`id`) REFERENCES `s_yf_auto_assign` (`id`) ON DELETE CASCADE, ADD CONSTRAINT `s_yf_auto_assign_groups_member_fk` FOREIGN KEY (`member`) REFERENCES `vtiger_groups` (`groupid`) ON DELETE CASCADE;
-- -- Constraints for table `s_yf_auto_assign_roles` -- ALTER TABLE `s_yf_auto_assign_roles` ADD CONSTRAINT `s_yf_auto_assign_roles_id_fk` FOREIGN KEY (`id`) REFERENCES `s_yf_auto_assign` (`id`) ON DELETE CASCADE, ADD CONSTRAINT `s_yf_auto_assign_roles_role_fk` FOREIGN KEY (`member`) REFERENCES `vtiger_role` (`roleid`) ON DELETE CASCADE;
-- -- Constraints for table `s_yf_auto_assign_users` -- ALTER TABLE `s_yf_auto_assign_users` ADD CONSTRAINT `s_yf_auto_assign_users_id_fk` FOREIGN KEY (`id`) REFERENCES `s_yf_auto_assign` (`id`) ON DELETE CASCADE, ADD CONSTRAINT `s_yf_auto_assign_users_member_fk` FOREIGN KEY (`member`) REFERENCES `vtiger_users` (`id`) ON DELETE CASCADE;
-- -- Constraints for table `s_yf_auto_record_flow_updater` -- ALTER TABLE `s_yf_auto_record_flow_updater` ADD CONSTRAINT `s_yf_auto_record_flow_updater_ibfk_1` FOREIGN KEY (`source_module`) REFERENCES `vtiger_tab` (`tabid`) ON DELETE CASCADE, ADD CONSTRAINT `s_yf_auto_record_flow_updater_ibfk_2` FOREIGN KEY (`target_module`) REFERENCES `vtiger_tab` (`tabid`) ON DELETE CASCADE;
-- -- Constraints for table `s_yf_calendar_sources` -- ALTER TABLE `s_yf_calendar_sources` ADD CONSTRAINT `s_yf_calendar_sources_ibfk_1` FOREIGN KEY (`base_module`) REFERENCES `vtiger_tab` (`tabid`) ON DELETE CASCADE, ADD CONSTRAINT `s_yf_calendar_sources_ibfk_2` FOREIGN KEY (`target_module`) REFERENCES `vtiger_tab` (`tabid`) ON DELETE CASCADE;
-- -- Constraints for table `s_yf_fields_anonymization` -- ALTER TABLE `s_yf_fields_anonymization` ADD CONSTRAINT `s_yf_fields_anonymization_fieldid_fk` FOREIGN KEY (`field_id`) REFERENCES `vtiger_field` (`fieldid`) ON DELETE CASCADE;
-- -- Constraints for table `s_yf_fields_dependency` -- ALTER TABLE `s_yf_fields_dependency` ADD CONSTRAINT `s_yf_fields_dependency_ibfk_1` FOREIGN KEY (`tabid`) REFERENCES `vtiger_tab` (`tabid`) ON DELETE CASCADE;
-- -- Constraints for table `s_yf_kanban_boards` -- ALTER TABLE `s_yf_kanban_boards` ADD CONSTRAINT `s_yf_kanban_boards_fieldid_fk` FOREIGN KEY (`fieldid`) REFERENCES `vtiger_field` (`fieldid`) ON DELETE CASCADE, ADD CONSTRAINT `s_yf_kanban_boards_tabid_fk` FOREIGN KEY (`tabid`) REFERENCES `vtiger_tab` (`tabid`) ON DELETE CASCADE;
-- -- Constraints for table `s_yf_mail_account` -- ALTER TABLE `s_yf_mail_account` ADD CONSTRAINT `s_yf_mail_account_mail_server_id_fk` FOREIGN KEY (`mail_server_id`) REFERENCES `s_yf_mail_servers` (`id`) ON DELETE CASCADE;
-- -- Constraints for table `s_yf_mail_queue` -- ALTER TABLE `s_yf_mail_queue` ADD CONSTRAINT `s_yf_mail_queue_ibfk_1` FOREIGN KEY (`smtp_id`) REFERENCES `s_yf_mail_smtp` (`id`) ON DELETE CASCADE;
-- -- Constraints for table `s_yf_picklist_dependency` -- ALTER TABLE `s_yf_picklist_dependency` ADD CONSTRAINT `s_yf_picklist_dependency_source_field_fk` FOREIGN KEY (`source_field`) REFERENCES `vtiger_field` (`fieldid`) ON DELETE CASCADE, ADD CONSTRAINT `s_yf_picklist_dependency_tabid_fk` FOREIGN KEY (`tabid`) REFERENCES `vtiger_tab` (`tabid`) ON DELETE CASCADE;
-- -- Constraints for table `s_yf_picklist_dependency_data` -- ALTER TABLE `s_yf_picklist_dependency_data` ADD CONSTRAINT `s_yf_picklist_dependency_data_id_fk` FOREIGN KEY (`id`) REFERENCES `s_yf_picklist_dependency` (`id`) ON DELETE CASCADE;
-- -- Constraints for table `s_yf_record_quick_changer` -- ALTER TABLE `s_yf_record_quick_changer` ADD CONSTRAINT `s_yf_record_quick_changer_ibfk_1` FOREIGN KEY (`tabid`) REFERENCES `vtiger_tab` (`tabid`) ON DELETE CASCADE;
-- -- Constraints for table `s_yf_sla_policy` -- ALTER TABLE `s_yf_sla_policy` ADD CONSTRAINT `fk_s_yf_sla_policy` FOREIGN KEY (`tabid`) REFERENCES `vtiger_tab` (`tabid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_activityregister` -- ALTER TABLE `u_yf_activityregister` ADD CONSTRAINT `fk_1_u_yf_activityregisteractivityregisterid` FOREIGN KEY (`activityregisterid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_activityregistercf` -- ALTER TABLE `u_yf_activityregistercf` ADD CONSTRAINT `fk_1_u_yf_activityregistercfactivityregisterid` FOREIGN KEY (`activityregisterid`) REFERENCES `u_yf_activityregister` (`activityregisterid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_activity_invitation` -- ALTER TABLE `u_yf_activity_invitation` ADD CONSTRAINT `u_yf_activity_invitation_ibfk_1` FOREIGN KEY (`activityid`) REFERENCES `vtiger_activity` (`activityid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_announcement` -- ALTER TABLE `u_yf_announcement` ADD CONSTRAINT `fk_1_u_yf_announcement` FOREIGN KEY (`announcementid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_announcementcf` -- ALTER TABLE `u_yf_announcementcf` ADD CONSTRAINT `fk_1_u_yf_announcementcf` FOREIGN KEY (`announcementid`) REFERENCES `u_yf_announcement` (`announcementid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_announcement_mark` -- ALTER TABLE `u_yf_announcement_mark` ADD CONSTRAINT `u_yf_announcement_mark_ibfk_1` FOREIGN KEY (`announcementid`) REFERENCES `u_yf_announcement` (`announcementid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_approvals` -- ALTER TABLE `u_yf_approvals` ADD CONSTRAINT `fk_1_u_yf_approvalsapprovalsid` FOREIGN KEY (`approvalsid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_approvalsregister` -- ALTER TABLE `u_yf_approvalsregister` ADD CONSTRAINT `fk_1_u_yf_approvalsregisterapprovalsregisterid` FOREIGN KEY (`approvalsregisterid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_auditregister` -- ALTER TABLE `u_yf_auditregister` ADD CONSTRAINT `fk_1_u_yf_auditregisterauditregisterid` FOREIGN KEY (`auditregisterid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_auditregistercf` -- ALTER TABLE `u_yf_auditregistercf` ADD CONSTRAINT `fk_1_u_yf_auditregistercfauditregisterid` FOREIGN KEY (`auditregisterid`) REFERENCES `u_yf_auditregister` (`auditregisterid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_auto_assign_rr` -- ALTER TABLE `u_yf_auto_assign_rr` ADD CONSTRAINT `s_yf_auto_assign_rr_id_fk` FOREIGN KEY (`id`) REFERENCES `s_yf_auto_assign` (`id`) ON DELETE CASCADE, ADD CONSTRAINT `s_yf_auto_assign_rr_user_fk` FOREIGN KEY (`user`) REFERENCES `vtiger_users` (`id`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_bankaccounts` -- ALTER TABLE `u_yf_bankaccounts` ADD CONSTRAINT `fk_1_u_yf_bankaccountsbankaccountsid` FOREIGN KEY (`bankaccountsid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_bankaccountscf` -- ALTER TABLE `u_yf_bankaccountscf` ADD CONSTRAINT `fk_1_u_yf_bankaccountscfbankaccountsid` FOREIGN KEY (`bankaccountsid`) REFERENCES `u_yf_bankaccounts` (`bankaccountsid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_cfixedassets` -- ALTER TABLE `u_yf_cfixedassets` ADD CONSTRAINT `fk_1_vtiger_cfixedassetscfixedassetsid` FOREIGN KEY (`cfixedassetsid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_cfixedassetscf` -- ALTER TABLE `u_yf_cfixedassetscf` ADD CONSTRAINT `fk_1_vtiger_cfixedassetscfcfixedassetsid` FOREIGN KEY (`cfixedassetsid`) REFERENCES `u_yf_cfixedassets` (`cfixedassetsid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_chat_messages_crm` -- ALTER TABLE `u_yf_chat_messages_crm` ADD CONSTRAINT `fk_chat_messages` FOREIGN KEY (`crmid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_chat_messages_global` -- ALTER TABLE `u_yf_chat_messages_global` ADD CONSTRAINT `u_yf_chat_messages_global_ibfk_1` FOREIGN KEY (`globalid`) REFERENCES `u_yf_chat_global` (`global_room_id`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_chat_messages_group` -- ALTER TABLE `u_yf_chat_messages_group` ADD CONSTRAINT `fk_chat_group_messages` FOREIGN KEY (`groupid`) REFERENCES `vtiger_groups` (`groupid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_chat_rooms_crm` -- ALTER TABLE `u_yf_chat_rooms_crm` ADD CONSTRAINT `fk_u_yf_chat_rooms_crm_crm` FOREIGN KEY (`crmid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE, ADD CONSTRAINT `fk_u_yf_chat_rooms_crm_users` FOREIGN KEY (`userid`) REFERENCES `vtiger_users` (`id`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_chat_rooms_global` -- ALTER TABLE `u_yf_chat_rooms_global` ADD CONSTRAINT `fk_u_yf_chat_rooms_global_global` FOREIGN KEY (`global_room_id`) REFERENCES `u_yf_chat_global` (`global_room_id`) ON DELETE CASCADE, ADD CONSTRAINT `fk_u_yf_chat_rooms_global_users` FOREIGN KEY (`userid`) REFERENCES `vtiger_users` (`id`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_chat_rooms_group` -- ALTER TABLE `u_yf_chat_rooms_group` ADD CONSTRAINT `fk_u_yf_chat_rooms_group` FOREIGN KEY (`groupid`) REFERENCES `vtiger_groups` (`groupid`) ON DELETE CASCADE, ADD CONSTRAINT `fk_u_yf_chat_rooms_group_users` FOREIGN KEY (`userid`) REFERENCES `vtiger_users` (`id`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_cinternaltickets` -- ALTER TABLE `u_yf_cinternaltickets` ADD CONSTRAINT `fk_1_vtiger_cinternalticketscinternalticketsid` FOREIGN KEY (`cinternalticketsid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_cinternalticketscf` -- ALTER TABLE `u_yf_cinternalticketscf` ADD CONSTRAINT `fk_1_vtiger_cinternalticketscfcinternalticketsid` FOREIGN KEY (`cinternalticketsid`) REFERENCES `u_yf_cinternaltickets` (`cinternalticketsid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_cmileagelogbook` -- ALTER TABLE `u_yf_cmileagelogbook` ADD CONSTRAINT `fk_1_vtiger_cmileagelogbookcmileagelogbookid` FOREIGN KEY (`cmileagelogbookid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_cmileagelogbookcf` -- ALTER TABLE `u_yf_cmileagelogbookcf` ADD CONSTRAINT `fk_1_vtiger_cmileagelogbookcfcmileagelogbookid` FOREIGN KEY (`cmileagelogbookid`) REFERENCES `u_yf_cmileagelogbook` (`cmileagelogbookid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_competition` -- ALTER TABLE `u_yf_competition` ADD CONSTRAINT `fk_1_u_yf_competition` FOREIGN KEY (`competitionid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_competitioncf` -- ALTER TABLE `u_yf_competitioncf` ADD CONSTRAINT `fk_1_u_yf_competitioncf` FOREIGN KEY (`competitionid`) REFERENCES `u_yf_competition` (`competitionid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_competition_address` -- ALTER TABLE `u_yf_competition_address` ADD CONSTRAINT `u_yf_competition_address_ibfk_1` FOREIGN KEY (`competitionaddressid`) REFERENCES `u_yf_competition` (`competitionid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_crmentity_label` -- ALTER TABLE `u_yf_crmentity_label` ADD CONSTRAINT `fk_u_yf_crmentity_label` FOREIGN KEY (`crmid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_crmentity_search_label` -- ALTER TABLE `u_yf_crmentity_search_label` ADD CONSTRAINT `fk_u_yf_crmentity_search_label` FOREIGN KEY (`crmid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_crmentity_showners` -- ALTER TABLE `u_yf_crmentity_showners` ADD CONSTRAINT `fk_u_yf_crmentity_showners` FOREIGN KEY (`crmid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_cv_condition` -- ALTER TABLE `u_yf_cv_condition` ADD CONSTRAINT `u_yf_cv_condition_fk` FOREIGN KEY (`group_id`) REFERENCES `u_yf_cv_condition_group` (`id`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_cv_condition_group` -- ALTER TABLE `u_yf_cv_condition_group` ADD CONSTRAINT `u_yf_cv_condition_group_fk` FOREIGN KEY (`cvid`) REFERENCES `vtiger_customview` (`cvid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_cv_duplicates` -- ALTER TABLE `u_yf_cv_duplicates` ADD CONSTRAINT `u_yf_cv_duplicates_cvid_fk` FOREIGN KEY (`cvid`) REFERENCES `vtiger_customview` (`cvid`) ON DELETE CASCADE, ADD CONSTRAINT `u_yf_cv_duplicates_fieldid_fk` FOREIGN KEY (`fieldid`) REFERENCES `vtiger_field` (`fieldid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_cv_privileges` -- ALTER TABLE `u_yf_cv_privileges` ADD CONSTRAINT `u_yf_cv_privileges_cvid_fk` FOREIGN KEY (`cvid`) REFERENCES `vtiger_customview` (`cvid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_datasetregister` -- ALTER TABLE `u_yf_datasetregister` ADD CONSTRAINT `fk_1_u_yf_datasetregisterdatasetregisterid` FOREIGN KEY (`datasetregisterid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_datasetregistercf` -- ALTER TABLE `u_yf_datasetregistercf` ADD CONSTRAINT `fk_1_u_yf_datasetregistercfdatasetregisterid` FOREIGN KEY (`datasetregisterid`) REFERENCES `u_yf_datasetregister` (`datasetregisterid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_documents_emailtemplates` -- ALTER TABLE `u_yf_documents_emailtemplates` ADD CONSTRAINT `fk_1_u_yf_documents_emailtemplates` FOREIGN KEY (`crmid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE, ADD CONSTRAINT `fk_2_u_yf_documents_emailtemplates` FOREIGN KEY (`relcrmid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_emailtemplates` -- ALTER TABLE `u_yf_emailtemplates` ADD CONSTRAINT `fk_1_vtiger_emailtemplatesemailtemplatesid` FOREIGN KEY (`emailtemplatesid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_faq_faq` -- ALTER TABLE `u_yf_faq_faq` ADD CONSTRAINT `fk_1_u_yf_faq_faq` FOREIGN KEY (`crmid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE, ADD CONSTRAINT `fk_2_u_yf_faq_faq` FOREIGN KEY (`relcrmid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_favorites` -- ALTER TABLE `u_yf_favorites` ADD CONSTRAINT `fk_1_u_yf_favorites` FOREIGN KEY (`relcrmid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE, ADD CONSTRAINT `fk_u_yf_favorites` FOREIGN KEY (`crmid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_favorite_owners` -- ALTER TABLE `u_yf_favorite_owners` ADD CONSTRAINT `u_yf_favorite_owners_tabid_fk` FOREIGN KEY (`tabid`) REFERENCES `vtiger_tab` (`tabid`) ON DELETE CASCADE, ADD CONSTRAINT `u_yf_favorite_owners_userid_fk` FOREIGN KEY (`userid`) REFERENCES `vtiger_users` (`id`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_favorite_shared_owners` -- ALTER TABLE `u_yf_favorite_shared_owners` ADD CONSTRAINT `u_yf_favorite_shared_owners_tabid_fk` FOREIGN KEY (`tabid`) REFERENCES `vtiger_tab` (`tabid`) ON DELETE CASCADE, ADD CONSTRAINT `u_yf_favorite_shared_owners_userid_fk` FOREIGN KEY (`userid`) REFERENCES `vtiger_users` (`id`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_fbookkeeping` -- ALTER TABLE `u_yf_fbookkeeping` ADD CONSTRAINT `u_yf_fbookkeeping_ibfk_1` FOREIGN KEY (`fbookkeepingid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_fbookkeepingcf` -- ALTER TABLE `u_yf_fbookkeepingcf` ADD CONSTRAINT `u_yf_fbookkeepingcf_ibfk_1` FOREIGN KEY (`fbookkeepingid`) REFERENCES `u_yf_fbookkeeping` (`fbookkeepingid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_fcorectinginvoice` -- ALTER TABLE `u_yf_fcorectinginvoice` ADD CONSTRAINT `fk_1_vtiger_fcorectinginvoice` FOREIGN KEY (`fcorectinginvoiceid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_fcorectinginvoicecf` -- ALTER TABLE `u_yf_fcorectinginvoicecf` ADD CONSTRAINT `fk_1_u_yf_fcorectinginvoicecf` FOREIGN KEY (`fcorectinginvoiceid`) REFERENCES `u_yf_fcorectinginvoice` (`fcorectinginvoiceid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_fcorectinginvoice_address` -- ALTER TABLE `u_yf_fcorectinginvoice_address` ADD CONSTRAINT `u_yf_fcorectinginvoice_address_ibfk_1` FOREIGN KEY (`fcorectinginvoiceaddressid`) REFERENCES `u_yf_fcorectinginvoice` (`fcorectinginvoiceid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_fcorectinginvoice_inventory` -- ALTER TABLE `u_yf_fcorectinginvoice_inventory` ADD CONSTRAINT `fk_1_u_yf_fcorectinginvoice_inventory` FOREIGN KEY (`crmid`) REFERENCES `u_yf_fcorectinginvoice` (`fcorectinginvoiceid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_featured_filter` -- ALTER TABLE `u_yf_featured_filter` ADD CONSTRAINT `u_yf_featured_filter_ibfk_1` FOREIGN KEY (`cvid`) REFERENCES `vtiger_customview` (`cvid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_finvoice` -- ALTER TABLE `u_yf_finvoice` ADD CONSTRAINT `fk_1_vtiger_finvoice` FOREIGN KEY (`finvoiceid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_finvoicecf` -- ALTER TABLE `u_yf_finvoicecf` ADD CONSTRAINT `fk_1_u_yf_finvoicecf` FOREIGN KEY (`finvoiceid`) REFERENCES `u_yf_finvoice` (`finvoiceid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_finvoicecost` -- ALTER TABLE `u_yf_finvoicecost` ADD CONSTRAINT `fk_1_vtiger_finvoicecost` FOREIGN KEY (`finvoicecostid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_finvoicecostcf` -- ALTER TABLE `u_yf_finvoicecostcf` ADD CONSTRAINT `fk_1_u_yf_finvoicecostcf` FOREIGN KEY (`finvoicecostid`) REFERENCES `u_yf_finvoicecost` (`finvoicecostid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_finvoicecost_address` -- ALTER TABLE `u_yf_finvoicecost_address` ADD CONSTRAINT `u_yf_finvoicecost_address_ibfk_1` FOREIGN KEY (`finvoicecostaddressid`) REFERENCES `u_yf_finvoicecost` (`finvoicecostid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_finvoicecost_inventory` -- ALTER TABLE `u_yf_finvoicecost_inventory` ADD CONSTRAINT `fk_1_u_yf_finvoicecost_inventory` FOREIGN KEY (`crmid`) REFERENCES `u_yf_finvoicecost` (`finvoicecostid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_finvoiceproforma` -- ALTER TABLE `u_yf_finvoiceproforma` ADD CONSTRAINT `fk_1_vtiger_finvoiceproforma` FOREIGN KEY (`finvoiceproformaid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_finvoiceproformacf` -- ALTER TABLE `u_yf_finvoiceproformacf` ADD CONSTRAINT `fk_1_vtiger_finvoiceproformacf` FOREIGN KEY (`finvoiceproformaid`) REFERENCES `u_yf_finvoiceproforma` (`finvoiceproformaid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_finvoiceproforma_address` -- ALTER TABLE `u_yf_finvoiceproforma_address` ADD CONSTRAINT `u_yf_finvoiceproforma_address_fk1` FOREIGN KEY (`finvoiceproformaaddressid`) REFERENCES `u_yf_finvoiceproforma` (`finvoiceproformaid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_finvoiceproforma_inventory` -- ALTER TABLE `u_yf_finvoiceproforma_inventory` ADD CONSTRAINT `fk_1_u_yf_finvoiceproforma_inventory` FOREIGN KEY (`crmid`) REFERENCES `u_yf_finvoiceproforma` (`finvoiceproformaid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_finvoice_address` -- ALTER TABLE `u_yf_finvoice_address` ADD CONSTRAINT `u_yf_finvoice_address_ibfk_1` FOREIGN KEY (`finvoiceaddressid`) REFERENCES `u_yf_finvoice` (`finvoiceid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_finvoice_inventory` -- ALTER TABLE `u_yf_finvoice_inventory` ADD CONSTRAINT `fk_1_u_yf_finvoice_inventory` FOREIGN KEY (`crmid`) REFERENCES `u_yf_finvoice` (`finvoiceid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_igdn` -- ALTER TABLE `u_yf_igdn` ADD CONSTRAINT `u_yf_igdn_ibfk_1` FOREIGN KEY (`igdnid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_igdnc` -- ALTER TABLE `u_yf_igdnc` ADD CONSTRAINT `u_yf_igdnc_ibfk_1` FOREIGN KEY (`igdncid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_igdnccf` -- ALTER TABLE `u_yf_igdnccf` ADD CONSTRAINT `u_yf_igdnccf_ibfk_1` FOREIGN KEY (`igdncid`) REFERENCES `u_yf_igdnc` (`igdncid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_igdncf` -- ALTER TABLE `u_yf_igdncf` ADD CONSTRAINT `u_yf_igdncf_ibfk_1` FOREIGN KEY (`igdnid`) REFERENCES `u_yf_igdn` (`igdnid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_igdnc_inventory` -- ALTER TABLE `u_yf_igdnc_inventory` ADD CONSTRAINT `fk_1_u_yf_igdnc_inventory` FOREIGN KEY (`crmid`) REFERENCES `u_yf_igdnc` (`igdncid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_igdn_inventory` -- ALTER TABLE `u_yf_igdn_inventory` ADD CONSTRAINT `fk_1_u_yf_igdn_inventory` FOREIGN KEY (`crmid`) REFERENCES `u_yf_igdn` (`igdnid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_igin` -- ALTER TABLE `u_yf_igin` ADD CONSTRAINT `u_yf_igin_ibfk_1` FOREIGN KEY (`iginid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_igincf` -- ALTER TABLE `u_yf_igincf` ADD CONSTRAINT `u_yf_igincf_ibfk_1` FOREIGN KEY (`iginid`) REFERENCES `u_yf_igin` (`iginid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_igin_inventory` -- ALTER TABLE `u_yf_igin_inventory` ADD CONSTRAINT `fk_1_u_yf_igin_inventory` FOREIGN KEY (`crmid`) REFERENCES `u_yf_igin` (`iginid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_igrn` -- ALTER TABLE `u_yf_igrn` ADD CONSTRAINT `u_yf_igrn_ibfk_1` FOREIGN KEY (`igrnid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_igrnc` -- ALTER TABLE `u_yf_igrnc` ADD CONSTRAINT `u_yf_igrnc_ibfk_1` FOREIGN KEY (`igrncid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_igrnccf` -- ALTER TABLE `u_yf_igrnccf` ADD CONSTRAINT `u_yf_igrnccf_ibfk_1` FOREIGN KEY (`igrncid`) REFERENCES `u_yf_igrnc` (`igrncid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_igrncf` -- ALTER TABLE `u_yf_igrncf` ADD CONSTRAINT `u_yf_igrncf_ibfk_1` FOREIGN KEY (`igrnid`) REFERENCES `u_yf_igrn` (`igrnid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_igrnc_inventory` -- ALTER TABLE `u_yf_igrnc_inventory` ADD CONSTRAINT `fk_1_u_yf_igrnc_inventory` FOREIGN KEY (`crmid`) REFERENCES `u_yf_igrnc` (`igrncid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_igrn_inventory` -- ALTER TABLE `u_yf_igrn_inventory` ADD CONSTRAINT `fk_1_u_yf_igrn_inventory` FOREIGN KEY (`crmid`) REFERENCES `u_yf_igrn` (`igrnid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_iidn` -- ALTER TABLE `u_yf_iidn` ADD CONSTRAINT `u_yf_iidn_ibfk_1` FOREIGN KEY (`iidnid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_iidncf` -- ALTER TABLE `u_yf_iidncf` ADD CONSTRAINT `u_yf_iidncf_ibfk_1` FOREIGN KEY (`iidnid`) REFERENCES `u_yf_iidn` (`iidnid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_iidn_inventory` -- ALTER TABLE `u_yf_iidn_inventory` ADD CONSTRAINT `fk_1_u_yf_iidn_inventory` FOREIGN KEY (`crmid`) REFERENCES `u_yf_iidn` (`iidnid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_incidentregister` -- ALTER TABLE `u_yf_incidentregister` ADD CONSTRAINT `fk_1_u_yf_incidentregisterincidentregisterid` FOREIGN KEY (`incidentregisterid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_incidentregistercf` -- ALTER TABLE `u_yf_incidentregistercf` ADD CONSTRAINT `fk_1_u_yf_incidentregistercfincidentregisterid` FOREIGN KEY (`incidentregisterid`) REFERENCES `u_yf_incidentregister` (`incidentregisterid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_ipreorder` -- ALTER TABLE `u_yf_ipreorder` ADD CONSTRAINT `u_yf_ipreorder_ibfk_1` FOREIGN KEY (`ipreorderid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_ipreordercf` -- ALTER TABLE `u_yf_ipreordercf` ADD CONSTRAINT `u_yf_ipreordercf_ibfk_1` FOREIGN KEY (`ipreorderid`) REFERENCES `u_yf_ipreorder` (`ipreorderid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_ipreorder_inventory` -- ALTER TABLE `u_yf_ipreorder_inventory` ADD CONSTRAINT `fk_1_u_yf_ipreorder_inventory` FOREIGN KEY (`crmid`) REFERENCES `u_yf_ipreorder` (`ipreorderid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_istdn` -- ALTER TABLE `u_yf_istdn` ADD CONSTRAINT `u_yf_istdn_ibfk_1` FOREIGN KEY (`istdnid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_istdncf` -- ALTER TABLE `u_yf_istdncf` ADD CONSTRAINT `u_yf_istdncf_ibfk_1` FOREIGN KEY (`istdnid`) REFERENCES `u_yf_istdn` (`istdnid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_istdn_inventory` -- ALTER TABLE `u_yf_istdn_inventory` ADD CONSTRAINT `fk_1_u_yf_istdn_inventory` FOREIGN KEY (`crmid`) REFERENCES `u_yf_istdn` (`istdnid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_istn` -- ALTER TABLE `u_yf_istn` ADD CONSTRAINT `u_yf_istn_ibfk_1` FOREIGN KEY (`istnid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_istncf` -- ALTER TABLE `u_yf_istncf` ADD CONSTRAINT `u_yf_istncf_ibfk_1` FOREIGN KEY (`istnid`) REFERENCES `u_yf_istn` (`istnid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_istorages` -- ALTER TABLE `u_yf_istorages` ADD CONSTRAINT `u_yf_istorages_ibfk_1` FOREIGN KEY (`istorageid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_istoragescf` -- ALTER TABLE `u_yf_istoragescf` ADD CONSTRAINT `u_yf_istoragescf_ibfk_1` FOREIGN KEY (`istorageid`) REFERENCES `u_yf_istorages` (`istorageid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_istorages_address` -- ALTER TABLE `u_yf_istorages_address` ADD CONSTRAINT `u_yf_istorages_address_ibfk_1` FOREIGN KEY (`istorageaddressid`) REFERENCES `u_yf_istorages` (`istorageid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_istorages_products` -- ALTER TABLE `u_yf_istorages_products` ADD CONSTRAINT `u_yf_istorages_products_ibfk_1` FOREIGN KEY (`crmid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE, ADD CONSTRAINT `u_yf_istorages_products_ibfk_2` FOREIGN KEY (`relcrmid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_istrn` -- ALTER TABLE `u_yf_istrn` ADD CONSTRAINT `u_yf_istrn_ibfk_1` FOREIGN KEY (`istrnid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_istrncf` -- ALTER TABLE `u_yf_istrncf` ADD CONSTRAINT `u_yf_istrncf_ibfk_1` FOREIGN KEY (`istrnid`) REFERENCES `u_yf_istrn` (`istrnid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_istrn_inventory` -- ALTER TABLE `u_yf_istrn_inventory` ADD CONSTRAINT `fk_1_u_yf_istrn_inventory` FOREIGN KEY (`crmid`) REFERENCES `u_yf_istrn` (`istrnid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_knowledgebase` -- ALTER TABLE `u_yf_knowledgebase` ADD CONSTRAINT `fk_1_vtiger_knowledgebase` FOREIGN KEY (`knowledgebaseid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_knowledgebasecf` -- ALTER TABLE `u_yf_knowledgebasecf` ADD CONSTRAINT `fk_1_vtiger_knowledgebasecf` FOREIGN KEY (`knowledgebaseid`) REFERENCES `u_yf_knowledgebase` (`knowledgebaseid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_knowledgebase_knowledgebase` -- ALTER TABLE `u_yf_knowledgebase_knowledgebase` ADD CONSTRAINT `fk_1_u_yf_knowledgebase_knowledgebase` FOREIGN KEY (`crmid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE, ADD CONSTRAINT `fk_2_u_yf_knowledgebase_knowledgebase` FOREIGN KEY (`relcrmid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_locationregister` -- ALTER TABLE `u_yf_locationregister` ADD CONSTRAINT `fk_1_u_yf_locationregisterlocationregisterid` FOREIGN KEY (`locationregisterid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_locationregistercf` -- ALTER TABLE `u_yf_locationregistercf` ADD CONSTRAINT `fk_1_u_yf_locationregistercflocationregisterid` FOREIGN KEY (`locationregisterid`) REFERENCES `u_yf_locationregister` (`locationregisterid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_locations` -- ALTER TABLE `u_yf_locations` ADD CONSTRAINT `fk_1_u_yf_locations` FOREIGN KEY (`locationsid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_locations_address` -- ALTER TABLE `u_yf_locations_address` ADD CONSTRAINT `u_yf_locations_address_ibfk_1` FOREIGN KEY (`locationaddressid`) REFERENCES `u_yf_locations` (`locationsid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_mailscanner_folders` -- ALTER TABLE `u_yf_mailscanner_folders` ADD CONSTRAINT `u_yf_mailscanner_folders_id_fk` FOREIGN KEY (`id`) REFERENCES `s_yf_mail_account` (`id`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_mail_address_book` -- ALTER TABLE `u_yf_mail_address_book` ADD CONSTRAINT `u_yf_mail_address_book_ibfk_1` FOREIGN KEY (`id`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_modentity_sequences` -- ALTER TABLE `u_yf_modentity_sequences` ADD CONSTRAINT `u_yf_modentity_sequences_tabid_fk` FOREIGN KEY (`tabid`) REFERENCES `vtiger_tab` (`tabid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_modtracker_inv` -- ALTER TABLE `u_yf_modtracker_inv` ADD CONSTRAINT `u_yf_modtracker_inv_id_fk` FOREIGN KEY (`id`) REFERENCES `vtiger_modtracker_basic` (`id`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_multicompany` -- ALTER TABLE `u_yf_multicompany` ADD CONSTRAINT `fk_1_u_yf_multicompanymulticompanyid` FOREIGN KEY (`multicompanyid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_multicompanycf` -- ALTER TABLE `u_yf_multicompanycf` ADD CONSTRAINT `fk_1_u_yf_multicompanycfmulticompanyid` FOREIGN KEY (`multicompanyid`) REFERENCES `u_yf_multicompany` (`multicompanyid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_notification` -- ALTER TABLE `u_yf_notification` ADD CONSTRAINT `fk_1_notification` FOREIGN KEY (`notificationid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_occurrences` -- ALTER TABLE `u_yf_occurrences` ADD CONSTRAINT `fk_1_u_yf_occurrencesoccurrencesid` FOREIGN KEY (`occurrencesid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_openstreetmap` -- ALTER TABLE `u_yf_openstreetmap` ADD CONSTRAINT `u_yf_openstreetmap_ibfk_1` FOREIGN KEY (`crmid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_openstreetmap_cache` -- ALTER TABLE `u_yf_openstreetmap_cache` ADD CONSTRAINT `u_yf_openstreetmap_cache_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `vtiger_users` (`id`) ON DELETE CASCADE, ADD CONSTRAINT `u_yf_openstreetmap_cache_ibfk_2` FOREIGN KEY (`crmids`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE, ADD CONSTRAINT `u_yf_openstreetmap_cache_ibfk_3` FOREIGN KEY (`module_name`) REFERENCES `vtiger_tab` (`name`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_openstreetmap_record_updater` -- ALTER TABLE `u_yf_openstreetmap_record_updater` ADD CONSTRAINT `u_yf_openstreetmap_record_updater_ibfk_1` FOREIGN KEY (`crmid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_partners` -- ALTER TABLE `u_yf_partners` ADD CONSTRAINT `fk_1_u_yf_partners` FOREIGN KEY (`partnersid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_partnerscf` -- ALTER TABLE `u_yf_partnerscf` ADD CONSTRAINT `fk_1_u_yf_partnerscf` FOREIGN KEY (`partnersid`) REFERENCES `u_yf_partners` (`partnersid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_partners_address` -- ALTER TABLE `u_yf_partners_address` ADD CONSTRAINT `u_yf_partners_address_ibfk_1` FOREIGN KEY (`partneraddressid`) REFERENCES `u_yf_partners` (`partnersid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_passwords` -- ALTER TABLE `u_yf_passwords` ADD CONSTRAINT `fk_1_u_yf_passwordspasswordsid` FOREIGN KEY (`passwordsid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_pdf_inv_scheme` -- ALTER TABLE `u_yf_pdf_inv_scheme` ADD CONSTRAINT `fk_u_yf_pdf_inv_scheme_crmid` FOREIGN KEY (`crmid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_picklist_close_state` -- ALTER TABLE `u_yf_picklist_close_state` ADD CONSTRAINT `fk_1_u_yf_picklist_close_state` FOREIGN KEY (`fieldid`) REFERENCES `vtiger_field` (`fieldid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_productcategory` -- ALTER TABLE `u_yf_productcategory` ADD CONSTRAINT `fk_1_u_yf_productcategoryproductcategoryid` FOREIGN KEY (`productcategoryid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_productcategorycf` -- ALTER TABLE `u_yf_productcategorycf` ADD CONSTRAINT `fk_1_u_yf_productcategorycfproductcategoryid` FOREIGN KEY (`productcategoryid`) REFERENCES `u_yf_productcategory` (`productcategoryid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_queue` -- ALTER TABLE `u_yf_queue` ADD CONSTRAINT `fk_1_u_yf_queuequeueid` FOREIGN KEY (`queueid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_recurring_info` -- ALTER TABLE `u_yf_recurring_info` ADD CONSTRAINT `u_yf_recurring_info_fk1` FOREIGN KEY (`srecurringordersid`) REFERENCES `u_yf_srecurringorders` (`srecurringordersid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_relations_members_entity` -- ALTER TABLE `u_yf_relations_members_entity` ADD CONSTRAINT `u_yf_relations_members_entity_crmid_fk` FOREIGN KEY (`crmid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE, ADD CONSTRAINT `u_yf_relations_members_entity_relcrmid_fk` FOREIGN KEY (`relcrmid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_report_template` -- ALTER TABLE `u_yf_report_template` ADD CONSTRAINT `u_yf_report_template_crmentity_fk` FOREIGN KEY (`id`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE, ADD CONSTRAINT `u_yf_report_template_query_fk` FOREIGN KEY (`query_id`) REFERENCES `u_yf_report_template_query` (`id`) ON DELETE SET NULL;
-- -- Constraints for table `u_yf_report_template_cf` -- ALTER TABLE `u_yf_report_template_cf` ADD CONSTRAINT `u_yf_report_template_cf_fk` FOREIGN KEY (`id`) REFERENCES `u_yf_report_template` (`id`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_report_template_query` -- ALTER TABLE `u_yf_report_template_query` ADD CONSTRAINT `u_yf_report_template_query_base_module_fk` FOREIGN KEY (`base_module_id`) REFERENCES `vtiger_entityname` (`tabid`) ON DELETE CASCADE, ADD CONSTRAINT `u_yf_report_template_query_parent_fk` FOREIGN KEY (`parent_id`) REFERENCES `u_yf_report_template_query` (`id`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_report_template_query_expression` -- ALTER TABLE `u_yf_report_template_query_expression` ADD CONSTRAINT `u_yf_report_template_query_expression_query_fk` FOREIGN KEY (`query_id`) REFERENCES `u_yf_report_template_query` (`id`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_report_template_query_filter` -- ALTER TABLE `u_yf_report_template_query_filter` ADD CONSTRAINT `u_yf_report_template_query_filter_filter_group_fk` FOREIGN KEY (`filter_group_id`) REFERENCES `u_yf_report_template_query_filter_group` (`id`) ON DELETE CASCADE, ADD CONSTRAINT `u_yf_report_template_query_filter_subquery_fk` FOREIGN KEY (`subquery_id`) REFERENCES `u_yf_report_template_query` (`id`) ON DELETE SET NULL;
-- -- Constraints for table `u_yf_report_template_query_filter_group` -- ALTER TABLE `u_yf_report_template_query_filter_group` ADD CONSTRAINT `u_yf_report_template_query_filter_group_parent_fk` FOREIGN KEY (`parent_id`) REFERENCES `u_yf_report_template_query_filter_group` (`id`) ON DELETE CASCADE, ADD CONSTRAINT `u_yf_report_template_query_filter_group_query_fk` FOREIGN KEY (`query_id`) REFERENCES `u_yf_report_template_query` (`id`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_report_template_query_join` -- ALTER TABLE `u_yf_report_template_query_join` ADD CONSTRAINT `u_yf_report_template_query_join_query_fk` FOREIGN KEY (`query_id`) REFERENCES `u_yf_report_template_query` (`id`) ON DELETE CASCADE, ADD CONSTRAINT `u_yf_report_template_query_join_relation_fk` FOREIGN KEY (`relation_id`) REFERENCES `vtiger_relatedlists` (`relation_id`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_reviewed_queue` -- ALTER TABLE `u_yf_reviewed_queue` ADD CONSTRAINT `fk_1_u_yf_reviewed_queue` FOREIGN KEY (`userid`) REFERENCES `vtiger_users` (`id`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_scalculations` -- ALTER TABLE `u_yf_scalculations` ADD CONSTRAINT `fk_1_u_yf_scalculations` FOREIGN KEY (`scalculationsid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_scalculationscf` -- ALTER TABLE `u_yf_scalculationscf` ADD CONSTRAINT `fk_1_u_yf_scalculationscf` FOREIGN KEY (`scalculationsid`) REFERENCES `u_yf_scalculations` (`scalculationsid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_scalculations_inventory` -- ALTER TABLE `u_yf_scalculations_inventory` ADD CONSTRAINT `fk_1_u_yf_scalculations_inventory` FOREIGN KEY (`crmid`) REFERENCES `u_yf_scalculations` (`scalculationsid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_servicecontracts_sla_policy` -- ALTER TABLE `u_yf_servicecontracts_sla_policy` ADD CONSTRAINT `fk_crmid_idx` FOREIGN KEY (`crmid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE, ADD CONSTRAINT `fk_sla_policy_idx` FOREIGN KEY (`sla_policy_id`) REFERENCES `s_yf_sla_policy` (`id`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_smstemplates` -- ALTER TABLE `u_yf_smstemplates` ADD CONSTRAINT `fk_1_u_yf_smstemplatessmstemplatesid` FOREIGN KEY (`smstemplatesid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_smstemplatescf` -- ALTER TABLE `u_yf_smstemplatescf` ADD CONSTRAINT `fk_1_u_yf_smstemplatescfsmstemplatesid` FOREIGN KEY (`smstemplatesid`) REFERENCES `u_yf_smstemplates` (`smstemplatesid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_squoteenquiries` -- ALTER TABLE `u_yf_squoteenquiries` ADD CONSTRAINT `fk_1_u_yf_squoteenquiries` FOREIGN KEY (`squoteenquiriesid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_squoteenquiriescf` -- ALTER TABLE `u_yf_squoteenquiriescf` ADD CONSTRAINT `fk_1_u_yf_squoteenquiriescf` FOREIGN KEY (`squoteenquiriesid`) REFERENCES `u_yf_squoteenquiries` (`squoteenquiriesid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_squotes` -- ALTER TABLE `u_yf_squotes` ADD CONSTRAINT `fk_1_u_yf_squotes` FOREIGN KEY (`squotesid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_squotescf` -- ALTER TABLE `u_yf_squotescf` ADD CONSTRAINT `fk_1_u_yf_squotescf` FOREIGN KEY (`squotesid`) REFERENCES `u_yf_squotes` (`squotesid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_squotes_address` -- ALTER TABLE `u_yf_squotes_address` ADD CONSTRAINT `u_yf_squotes_address_ibfk_1` FOREIGN KEY (`squotesaddressid`) REFERENCES `u_yf_squotes` (`squotesid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_squotes_inventory` -- ALTER TABLE `u_yf_squotes_inventory` ADD CONSTRAINT `fk_1_u_yf_squotes_inventory` FOREIGN KEY (`crmid`) REFERENCES `u_yf_squotes` (`squotesid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_srecurringorders` -- ALTER TABLE `u_yf_srecurringorders` ADD CONSTRAINT `fk_1_u_yf_srecurringorders` FOREIGN KEY (`srecurringordersid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_srecurringorderscf` -- ALTER TABLE `u_yf_srecurringorderscf` ADD CONSTRAINT `fk_1_u_yf_srecurringorderscf` FOREIGN KEY (`srecurringordersid`) REFERENCES `u_yf_srecurringorders` (`srecurringordersid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_srecurringorders_address` -- ALTER TABLE `u_yf_srecurringorders_address` ADD CONSTRAINT `u_yf_srecurringorders_address_ibfk_1` FOREIGN KEY (`srecurringordersaddressid`) REFERENCES `u_yf_srecurringorders` (`srecurringordersid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_srecurringorders_inventory` -- ALTER TABLE `u_yf_srecurringorders_inventory` ADD CONSTRAINT `fk_1_u_yf_srecurringorders_inventory` FOREIGN KEY (`crmid`) REFERENCES `u_yf_srecurringorders` (`srecurringordersid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_srequirementscards` -- ALTER TABLE `u_yf_srequirementscards` ADD CONSTRAINT `fk_1_u_yf_srequirementscards` FOREIGN KEY (`srequirementscardsid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_srequirementscardscf` -- ALTER TABLE `u_yf_srequirementscardscf` ADD CONSTRAINT `fk_1_u_yf_srequirementscardscf` FOREIGN KEY (`srequirementscardsid`) REFERENCES `u_yf_srequirementscards` (`srequirementscardsid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_srequirementscards_inventory` -- ALTER TABLE `u_yf_srequirementscards_inventory` ADD CONSTRAINT `fk_1_u_yf_srequirementscards_inventory` FOREIGN KEY (`crmid`) REFERENCES `u_yf_srequirementscards` (`srequirementscardsid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_ssalesprocesses` -- ALTER TABLE `u_yf_ssalesprocesses` ADD CONSTRAINT `fk_1_u_yf_ssalesprocesses` FOREIGN KEY (`ssalesprocessesid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_ssalesprocessescf` -- ALTER TABLE `u_yf_ssalesprocessescf` ADD CONSTRAINT `fk_1_u_yf_ssalesprocessescf` FOREIGN KEY (`ssalesprocessesid`) REFERENCES `u_yf_ssalesprocesses` (`ssalesprocessesid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_ssingleorders` -- ALTER TABLE `u_yf_ssingleorders` ADD CONSTRAINT `fk_1_u_yf_ssingleorders` FOREIGN KEY (`ssingleordersid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_ssingleorderscf` -- ALTER TABLE `u_yf_ssingleorderscf` ADD CONSTRAINT `fk_1_u_yf_ssingleorderscf` FOREIGN KEY (`ssingleordersid`) REFERENCES `u_yf_ssingleorders` (`ssingleordersid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_ssingleorders_address` -- ALTER TABLE `u_yf_ssingleorders_address` ADD CONSTRAINT `u_yf_ssingleorders_address_ibfk_1` FOREIGN KEY (`ssingleordersaddressid`) REFERENCES `u_yf_ssingleorders` (`ssingleordersid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_ssingleorders_inventory` -- ALTER TABLE `u_yf_ssingleorders_inventory` ADD CONSTRAINT `fk_1_u_yf_ssingleorders_inventory` FOREIGN KEY (`crmid`) REFERENCES `u_yf_ssingleorders` (`ssingleordersid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_svendorenquiries` -- ALTER TABLE `u_yf_svendorenquiries` ADD CONSTRAINT `fk_1_u_yf_svendorenquiries` FOREIGN KEY (`svendorenquiriesid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_svendorenquiriescf` -- ALTER TABLE `u_yf_svendorenquiriescf` ADD CONSTRAINT `fk_1_u_yf_svendorenquiriescf` FOREIGN KEY (`svendorenquiriesid`) REFERENCES `u_yf_svendorenquiries` (`svendorenquiriesid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_svendorenquiries_inventory` -- ALTER TABLE `u_yf_svendorenquiries_inventory` ADD CONSTRAINT `fk_1_u_yf_svendorenquiries_inventory` FOREIGN KEY (`crmid`) REFERENCES `u_yf_svendorenquiries` (`svendorenquiriesid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_timeline` -- ALTER TABLE `u_yf_timeline` ADD CONSTRAINT `fk_1_u_yf_timeline` FOREIGN KEY (`crmid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_users_pinned` -- ALTER TABLE `u_yf_users_pinned` ADD CONSTRAINT `u_yf_users_pinned_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `vtiger_users` (`id`) ON DELETE CASCADE, ADD CONSTRAINT `u_yf_users_pinned_ibfk_2` FOREIGN KEY (`tabid`) REFERENCES `vtiger_tab` (`tabid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_watchdog_record` -- ALTER TABLE `u_yf_watchdog_record` ADD CONSTRAINT `u_yf_watchdog_record_ibfk_1` FOREIGN KEY (`record`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `u_yf_watchdog_schedule` -- ALTER TABLE `u_yf_watchdog_schedule` ADD CONSTRAINT `u_yf_watchdog_schedule_ibfk_1` FOREIGN KEY (`userid`) REFERENCES `vtiger_users` (`id`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_account` -- ALTER TABLE `vtiger_account` ADD CONSTRAINT `fk_1_vtiger_account` FOREIGN KEY (`accountid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_accountaddress` -- ALTER TABLE `vtiger_accountaddress` ADD CONSTRAINT `vtiger_accountaddress_ibfk_1` FOREIGN KEY (`accountaddressid`) REFERENCES `vtiger_account` (`accountid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_accountscf` -- ALTER TABLE `vtiger_accountscf` ADD CONSTRAINT `fk_1_vtiger_accountscf` FOREIGN KEY (`accountid`) REFERENCES `vtiger_account` (`accountid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_activity` -- ALTER TABLE `vtiger_activity` ADD CONSTRAINT `fk_1_vtiger_activity` FOREIGN KEY (`activityid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_activitycf` -- ALTER TABLE `vtiger_activitycf` ADD CONSTRAINT `vtiger_activitycf_ibfk_1` FOREIGN KEY (`activityid`) REFERENCES `vtiger_activity` (`activityid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_activityproductrel` -- ALTER TABLE `vtiger_activityproductrel` ADD CONSTRAINT `fk_2_vtiger_activityproductrel` FOREIGN KEY (`productid`) REFERENCES `vtiger_products` (`productid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_activity_reminder` -- ALTER TABLE `vtiger_activity_reminder` ADD CONSTRAINT `vtiger_activity_reminder_ibfk_1` FOREIGN KEY (`activity_id`) REFERENCES `vtiger_activity` (`activityid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_activity_reminder_popup` -- ALTER TABLE `vtiger_activity_reminder_popup` ADD CONSTRAINT `vtiger_activity_reminder_popup_ibfk_1` FOREIGN KEY (`recordid`) REFERENCES `vtiger_activity` (`activityid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_activity_update_dates` -- ALTER TABLE `vtiger_activity_update_dates` ADD CONSTRAINT `vtiger_activity_update_dates_ibfk_1` FOREIGN KEY (`task_id`) REFERENCES `com_vtiger_workflowtasks` (`task_id`) ON DELETE CASCADE, ADD CONSTRAINT `vtiger_activity_update_dates_ibfk_2` FOREIGN KEY (`parent`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE, ADD CONSTRAINT `vtiger_activity_update_dates_ibfk_3` FOREIGN KEY (`activityid`) REFERENCES `vtiger_activity` (`activityid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_assets` -- ALTER TABLE `vtiger_assets` ADD CONSTRAINT `fk_1_vtiger_assets` FOREIGN KEY (`assetsid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_assetscf` -- ALTER TABLE `vtiger_assetscf` ADD CONSTRAINT `vtiger_assetscf_ibfk_1` FOREIGN KEY (`assetsid`) REFERENCES `vtiger_assets` (`assetsid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_blocks` -- ALTER TABLE `vtiger_blocks` ADD CONSTRAINT `fk_1_vtiger_blocks` FOREIGN KEY (`tabid`) REFERENCES `vtiger_tab` (`tabid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_callhistory` -- ALTER TABLE `vtiger_callhistory` ADD CONSTRAINT `vtiger_callhistory_ibfk_1` FOREIGN KEY (`callhistoryid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_callhistorycf` -- ALTER TABLE `vtiger_callhistorycf` ADD CONSTRAINT `vtiger_callhistorycf_ibfk_1` FOREIGN KEY (`callhistoryid`) REFERENCES `vtiger_callhistory` (`callhistoryid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_campaign` -- ALTER TABLE `vtiger_campaign` ADD CONSTRAINT `fk_vtiger_campaigncampaignid` FOREIGN KEY (`campaignid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_campaignscf` -- ALTER TABLE `vtiger_campaignscf` ADD CONSTRAINT `fk_1_vtiger_campaignscf` FOREIGN KEY (`campaignid`) REFERENCES `vtiger_campaign` (`campaignid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_campaign_records` -- ALTER TABLE `vtiger_campaign_records` ADD CONSTRAINT `fk_vtiger_crmentity` FOREIGN KEY (`crmid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_contactaddress` -- ALTER TABLE `vtiger_contactaddress` ADD CONSTRAINT `fk_1_vtiger_contactaddress` FOREIGN KEY (`contactaddressid`) REFERENCES `vtiger_contactdetails` (`contactid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_contactdetails` -- ALTER TABLE `vtiger_contactdetails` ADD CONSTRAINT `fk_1_vtiger_contactdetails` FOREIGN KEY (`contactid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_contactscf` -- ALTER TABLE `vtiger_contactscf` ADD CONSTRAINT `fk_1_vtiger_contactscf` FOREIGN KEY (`contactid`) REFERENCES `vtiger_contactdetails` (`contactid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_contactsubdetails` -- ALTER TABLE `vtiger_contactsubdetails` ADD CONSTRAINT `fk_1_vtiger_contactsubdetails` FOREIGN KEY (`contactsubscriptionid`) REFERENCES `vtiger_contactdetails` (`contactid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_crmentityrel` -- ALTER TABLE `vtiger_crmentityrel` ADD CONSTRAINT `vtiger_crmentityrel_crmid_fk` FOREIGN KEY (`crmid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE, ADD CONSTRAINT `vtiger_crmentityrel_relcrmid_fk` FOREIGN KEY (`relcrmid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_customaction` -- ALTER TABLE `vtiger_customaction` ADD CONSTRAINT `fk_1_vtiger_customaction` FOREIGN KEY (`cvid`) REFERENCES `vtiger_customview` (`cvid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_customerdetails` -- ALTER TABLE `vtiger_customerdetails` ADD CONSTRAINT `fk_1_vtiger_customerdetails` FOREIGN KEY (`customerid`) REFERENCES `vtiger_contactdetails` (`contactid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_customview` -- ALTER TABLE `vtiger_customview` ADD CONSTRAINT `fk_1_vtiger_customview` FOREIGN KEY (`entitytype`) REFERENCES `vtiger_tab` (`name`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_cvcolumnlist` -- ALTER TABLE `vtiger_cvcolumnlist` ADD CONSTRAINT `fk_1_vtiger_cvcolumnlist` FOREIGN KEY (`cvid`) REFERENCES `vtiger_customview` (`cvid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_datashare_grp2grp` -- ALTER TABLE `vtiger_datashare_grp2grp` ADD CONSTRAINT `fk_3_vtiger_datashare_grp2grp` FOREIGN KEY (`to_groupid`) REFERENCES `vtiger_groups` (`groupid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_datashare_grp2role` -- ALTER TABLE `vtiger_datashare_grp2role` ADD CONSTRAINT `fk_3_vtiger_datashare_grp2role` FOREIGN KEY (`to_roleid`) REFERENCES `vtiger_role` (`roleid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_datashare_grp2rs` -- ALTER TABLE `vtiger_datashare_grp2rs` ADD CONSTRAINT `fk_3_vtiger_datashare_grp2rs` FOREIGN KEY (`to_roleandsubid`) REFERENCES `vtiger_role` (`roleid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_datashare_module_rel` -- ALTER TABLE `vtiger_datashare_module_rel` ADD CONSTRAINT `fk_1_vtiger_datashare_module_rel` FOREIGN KEY (`tabid`) REFERENCES `vtiger_tab` (`tabid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_datashare_relatedmodules` -- ALTER TABLE `vtiger_datashare_relatedmodules` ADD CONSTRAINT `fk_2_vtiger_datashare_relatedmodules` FOREIGN KEY (`tabid`) REFERENCES `vtiger_tab` (`tabid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_datashare_role2group` -- ALTER TABLE `vtiger_datashare_role2group` ADD CONSTRAINT `fk_3_vtiger_datashare_role2group` FOREIGN KEY (`share_roleid`) REFERENCES `vtiger_role` (`roleid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_datashare_role2role` -- ALTER TABLE `vtiger_datashare_role2role` ADD CONSTRAINT `fk_3_vtiger_datashare_role2role` FOREIGN KEY (`to_roleid`) REFERENCES `vtiger_role` (`roleid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_datashare_role2rs` -- ALTER TABLE `vtiger_datashare_role2rs` ADD CONSTRAINT `fk_3_vtiger_datashare_role2rs` FOREIGN KEY (`to_roleandsubid`) REFERENCES `vtiger_role` (`roleid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_datashare_rs2grp` -- ALTER TABLE `vtiger_datashare_rs2grp` ADD CONSTRAINT `fk_3_vtiger_datashare_rs2grp` FOREIGN KEY (`share_roleandsubid`) REFERENCES `vtiger_role` (`roleid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_datashare_rs2role` -- ALTER TABLE `vtiger_datashare_rs2role` ADD CONSTRAINT `fk_3_vtiger_datashare_rs2role` FOREIGN KEY (`to_roleid`) REFERENCES `vtiger_role` (`roleid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_datashare_rs2rs` -- ALTER TABLE `vtiger_datashare_rs2rs` ADD CONSTRAINT `fk_3_vtiger_datashare_rs2rs` FOREIGN KEY (`to_roleandsubid`) REFERENCES `vtiger_role` (`roleid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_defaultcv` -- ALTER TABLE `vtiger_defaultcv` ADD CONSTRAINT `fk_1_vtiger_defaultcv` FOREIGN KEY (`tabid`) REFERENCES `vtiger_tab` (`tabid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_def_org_share` -- ALTER TABLE `vtiger_def_org_share` ADD CONSTRAINT `fk_1_def_org_share_permission` FOREIGN KEY (`permission`) REFERENCES `vtiger_org_share_action_mapping` (`share_action_id`) ON DELETE CASCADE, ADD CONSTRAINT `fk_1_def_org_share_tabid` FOREIGN KEY (`tabid`) REFERENCES `vtiger_tab` (`tabid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_entityname` -- ALTER TABLE `vtiger_entityname` ADD CONSTRAINT `fk_1_vtiger_entityname` FOREIGN KEY (`tabid`) REFERENCES `vtiger_tab` (`tabid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_entity_stats` -- ALTER TABLE `vtiger_entity_stats` ADD CONSTRAINT `fk_1_vtiger_entity_stats` FOREIGN KEY (`crmid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_faq` -- ALTER TABLE `vtiger_faq` ADD CONSTRAINT `fk_1_vtiger_faq` FOREIGN KEY (`id`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_faqcf` -- ALTER TABLE `vtiger_faqcf` ADD CONSTRAINT `fk_1_vtiger_faqcf` FOREIGN KEY (`faqid`) REFERENCES `vtiger_faq` (`id`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_field` -- ALTER TABLE `vtiger_field` ADD CONSTRAINT `fk_1_vtiger_field` FOREIGN KEY (`tabid`) REFERENCES `vtiger_tab` (`tabid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_fieldmodulerel` -- ALTER TABLE `vtiger_fieldmodulerel` ADD CONSTRAINT `vtiger_fieldmodulerel_ibfk_1` FOREIGN KEY (`fieldid`) REFERENCES `vtiger_field` (`fieldid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_group2grouprel` -- ALTER TABLE `vtiger_group2grouprel` ADD CONSTRAINT `fk_2_vtiger_group2grouprel` FOREIGN KEY (`groupid`) REFERENCES `vtiger_groups` (`groupid`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `vtiger_group2grouprel_containsgroupid_fk` FOREIGN KEY (`containsgroupid`) REFERENCES `vtiger_groups` (`groupid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_group2modules` -- ALTER TABLE `vtiger_group2modules` ADD CONSTRAINT `vtiger_group2modules_ibfk_1` FOREIGN KEY (`groupid`) REFERENCES `vtiger_groups` (`groupid`) ON DELETE CASCADE, ADD CONSTRAINT `vtiger_group2modules_ibfk_2` FOREIGN KEY (`tabid`) REFERENCES `vtiger_tab` (`tabid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_group2role` -- ALTER TABLE `vtiger_group2role` ADD CONSTRAINT `fk_2_vtiger_group2role` FOREIGN KEY (`roleid`) REFERENCES `vtiger_role` (`roleid`) ON DELETE CASCADE, ADD CONSTRAINT `vtiger_group2role_groupid_fk` FOREIGN KEY (`groupid`) REFERENCES `vtiger_groups` (`groupid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_group2rs` -- ALTER TABLE `vtiger_group2rs` ADD CONSTRAINT `fk_2_vtiger_group2rs` FOREIGN KEY (`roleandsubid`) REFERENCES `vtiger_role` (`roleid`) ON DELETE CASCADE, ADD CONSTRAINT `vtiger_group2rs_groupid_fk` FOREIGN KEY (`groupid`) REFERENCES `vtiger_groups` (`groupid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_holidaysentitlement` -- ALTER TABLE `vtiger_holidaysentitlement` ADD CONSTRAINT `fk_1_vtiger_holidaysentitlement` FOREIGN KEY (`holidaysentitlementid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_holidaysentitlementcf` -- ALTER TABLE `vtiger_holidaysentitlementcf` ADD CONSTRAINT `fk_1_vtiger_holidaysentitlementcf` FOREIGN KEY (`holidaysentitlementid`) REFERENCES `vtiger_holidaysentitlement` (`holidaysentitlementid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_ideas` -- ALTER TABLE `vtiger_ideas` ADD CONSTRAINT `fk_1_vtiger_ideas` FOREIGN KEY (`ideasid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_ideascf` -- ALTER TABLE `vtiger_ideascf` ADD CONSTRAINT `fk_1_vtiger_ideascf` FOREIGN KEY (`ideasid`) REFERENCES `vtiger_ideas` (`ideasid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_leadaddress` -- ALTER TABLE `vtiger_leadaddress` ADD CONSTRAINT `fk_1_vtiger_leadaddress` FOREIGN KEY (`leadaddressid`) REFERENCES `vtiger_leaddetails` (`leadid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_leaddetails` -- ALTER TABLE `vtiger_leaddetails` ADD CONSTRAINT `fk_1_vtiger_leaddetails` FOREIGN KEY (`leadid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_leadscf` -- ALTER TABLE `vtiger_leadscf` ADD CONSTRAINT `fk_1_vtiger_leadscf` FOREIGN KEY (`leadid`) REFERENCES `vtiger_leaddetails` (`leadid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_leadsubdetails` -- ALTER TABLE `vtiger_leadsubdetails` ADD CONSTRAINT `fk_1_vtiger_leadsubdetails` FOREIGN KEY (`leadsubscriptionid`) REFERENCES `vtiger_leaddetails` (`leadid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_lettersin` -- ALTER TABLE `vtiger_lettersin` ADD CONSTRAINT `fk_1_vtiger_lettersin` FOREIGN KEY (`lettersinid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_lettersincf` -- ALTER TABLE `vtiger_lettersincf` ADD CONSTRAINT `fk_1_vtiger_lettersincf` FOREIGN KEY (`lettersinid`) REFERENCES `vtiger_lettersin` (`lettersinid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_lettersout` -- ALTER TABLE `vtiger_lettersout` ADD CONSTRAINT `fk_1_vtiger_lettersout` FOREIGN KEY (`lettersoutid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_lettersoutcf` -- ALTER TABLE `vtiger_lettersoutcf` ADD CONSTRAINT `fk_1_vtiger_lettersoutcf` FOREIGN KEY (`lettersoutid`) REFERENCES `vtiger_lettersout` (`lettersoutid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_modcomments` -- ALTER TABLE `vtiger_modcomments` ADD CONSTRAINT `vtiger_modcomments_modcommentsid_fk` FOREIGN KEY (`modcommentsid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_modcommentscf` -- ALTER TABLE `vtiger_modcommentscf` ADD CONSTRAINT `vtiger_modcommentscf_ibfk_1` FOREIGN KEY (`modcommentsid`) REFERENCES `vtiger_modcomments` (`modcommentsid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_modentity_num` -- ALTER TABLE `vtiger_modentity_num` ADD CONSTRAINT `fk_1_modentity_num_tabid` FOREIGN KEY (`tabid`) REFERENCES `vtiger_tab` (`tabid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_module_dashboard_widgets` -- ALTER TABLE `vtiger_module_dashboard_widgets` ADD CONSTRAINT `vtiger_module_dashboard_widgets_ibfk_1` FOREIGN KEY (`templateid`) REFERENCES `vtiger_module_dashboard` (`id`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_notes` -- ALTER TABLE `vtiger_notes` ADD CONSTRAINT `fk_1_vtiger_notes` FOREIGN KEY (`notesid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_notescf` -- ALTER TABLE `vtiger_notescf` ADD CONSTRAINT `vtiger_notescf_ibfk_1` FOREIGN KEY (`notesid`) REFERENCES `vtiger_notes` (`notesid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_org_share_action2tab` -- ALTER TABLE `vtiger_org_share_action2tab` ADD CONSTRAINT `fk_2_vtiger_org_share_action2tab` FOREIGN KEY (`tabid`) REFERENCES `vtiger_tab` (`tabid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_ossemployees` -- ALTER TABLE `vtiger_ossemployees` ADD CONSTRAINT `fk_1_vtiger_ossemployees` FOREIGN KEY (`ossemployeesid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_ossemployeescf` -- ALTER TABLE `vtiger_ossemployeescf` ADD CONSTRAINT `fk_1_vtiger_ossemployeescf` FOREIGN KEY (`ossemployeesid`) REFERENCES `vtiger_ossemployees` (`ossemployeesid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_ossmailview` -- ALTER TABLE `vtiger_ossmailview` ADD CONSTRAINT `fk_1_vtiger_ossmailview` FOREIGN KEY (`ossmailviewid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_ossmailviewcf` -- ALTER TABLE `vtiger_ossmailviewcf` ADD CONSTRAINT `fk_1_vtiger_ossmailviewcf` FOREIGN KEY (`ossmailviewid`) REFERENCES `vtiger_ossmailview` (`ossmailviewid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_ossmailview_files` -- ALTER TABLE `vtiger_ossmailview_files` ADD CONSTRAINT `fk_1_vtiger_ossmailview_files` FOREIGN KEY (`ossmailviewid`) REFERENCES `vtiger_ossmailview` (`ossmailviewid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_ossmailview_relation` -- ALTER TABLE `vtiger_ossmailview_relation` ADD CONSTRAINT `vtiger_ossmailview_relation_ibfk_1` FOREIGN KEY (`ossmailviewid`) REFERENCES `vtiger_ossmailview` (`ossmailviewid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_ossoutsourcedservices` -- ALTER TABLE `vtiger_ossoutsourcedservices` ADD CONSTRAINT `fk_1_vtiger_ossoutsourcedservices` FOREIGN KEY (`ossoutsourcedservicesid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_ossoutsourcedservicescf` -- ALTER TABLE `vtiger_ossoutsourcedservicescf` ADD CONSTRAINT `fk_1_vtiger_ossoutsourcedservicescf` FOREIGN KEY (`ossoutsourcedservicesid`) REFERENCES `vtiger_ossoutsourcedservices` (`ossoutsourcedservicesid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_osssoldservices` -- ALTER TABLE `vtiger_osssoldservices` ADD CONSTRAINT `fk_1_vtiger_osssoldservices` FOREIGN KEY (`osssoldservicesid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_osssoldservicescf` -- ALTER TABLE `vtiger_osssoldservicescf` ADD CONSTRAINT `fk_1_vtiger_osssoldservicescf` FOREIGN KEY (`osssoldservicesid`) REFERENCES `vtiger_osssoldservices` (`osssoldservicesid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_osstimecontrol` -- ALTER TABLE `vtiger_osstimecontrol` ADD CONSTRAINT `vtiger_osstimecontrol` FOREIGN KEY (`osstimecontrolid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_osstimecontrolcf` -- ALTER TABLE `vtiger_osstimecontrolcf` ADD CONSTRAINT `vtiger_osstimecontrolcf` FOREIGN KEY (`osstimecontrolid`) REFERENCES `vtiger_osstimecontrol` (`osstimecontrolid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_outsourcedproducts` -- ALTER TABLE `vtiger_outsourcedproducts` ADD CONSTRAINT `fk_1_vtiger_outsourcedproducts` FOREIGN KEY (`outsourcedproductsid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_outsourcedproductscf` -- ALTER TABLE `vtiger_outsourcedproductscf` ADD CONSTRAINT `fk_1_vtiger_outsourcedproductscf` FOREIGN KEY (`outsourcedproductsid`) REFERENCES `vtiger_outsourcedproducts` (`outsourcedproductsid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_paymentsin` -- ALTER TABLE `vtiger_paymentsin` ADD CONSTRAINT `fk_1_vtiger_paymentsin` FOREIGN KEY (`paymentsinid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_paymentsincf` -- ALTER TABLE `vtiger_paymentsincf` ADD CONSTRAINT `fk_1_vtiger_paymentsincf` FOREIGN KEY (`paymentsinid`) REFERENCES `vtiger_paymentsin` (`paymentsinid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_paymentsout` -- ALTER TABLE `vtiger_paymentsout` ADD CONSTRAINT `fk_1_vtiger_paymentsout` FOREIGN KEY (`paymentsoutid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_paymentsoutcf` -- ALTER TABLE `vtiger_paymentsoutcf` ADD CONSTRAINT `fk_1_vtiger_paymentsoutcf` FOREIGN KEY (`paymentsoutid`) REFERENCES `vtiger_paymentsout` (`paymentsoutid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_pricebook` -- ALTER TABLE `vtiger_pricebook` ADD CONSTRAINT `fk_1_vtiger_pricebook` FOREIGN KEY (`pricebookid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_pricebookcf` -- ALTER TABLE `vtiger_pricebookcf` ADD CONSTRAINT `fk_1_vtiger_pricebookcf` FOREIGN KEY (`pricebookid`) REFERENCES `vtiger_pricebook` (`pricebookid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_pricebookproductrel` -- ALTER TABLE `vtiger_pricebookproductrel` ADD CONSTRAINT `fk_1_vtiger_pricebookproductrel` FOREIGN KEY (`pricebookid`) REFERENCES `vtiger_pricebook` (`pricebookid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_productcf` -- ALTER TABLE `vtiger_productcf` ADD CONSTRAINT `fk_1_vtiger_productcf` FOREIGN KEY (`productid`) REFERENCES `vtiger_products` (`productid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_products` -- ALTER TABLE `vtiger_products` ADD CONSTRAINT `fk_1_vtiger_products` FOREIGN KEY (`productid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_profile2field` -- ALTER TABLE `vtiger_profile2field` ADD CONSTRAINT `fk_1_profile2field_fieldid` FOREIGN KEY (`fieldid`) REFERENCES `vtiger_field` (`fieldid`) ON DELETE CASCADE, ADD CONSTRAINT `fk_1_profile2field_profileid` FOREIGN KEY (`profileid`) REFERENCES `vtiger_profile` (`profileid`) ON DELETE CASCADE, ADD CONSTRAINT `fk_2_profile2field_tabid` FOREIGN KEY (`tabid`) REFERENCES `vtiger_tab` (`tabid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_profile2globalpermissions` -- ALTER TABLE `vtiger_profile2globalpermissions` ADD CONSTRAINT `fk_1_vtiger_profile2globalpermissions` FOREIGN KEY (`profileid`) REFERENCES `vtiger_profile` (`profileid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_profile2standardpermissions` -- ALTER TABLE `vtiger_profile2standardpermissions` ADD CONSTRAINT `fk_1_profile2stand_profileid` FOREIGN KEY (`profileid`) REFERENCES `vtiger_profile` (`profileid`) ON DELETE CASCADE, ADD CONSTRAINT `fk_1_profile2stand_tabid` FOREIGN KEY (`tabid`) REFERENCES `vtiger_tab` (`tabid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_profile2tab` -- ALTER TABLE `vtiger_profile2tab` ADD CONSTRAINT `fk_1_profile2tab_profileid` FOREIGN KEY (`profileid`) REFERENCES `vtiger_profile` (`profileid`) ON DELETE CASCADE, ADD CONSTRAINT `fk_1_profile2tab_tabid` FOREIGN KEY (`tabid`) REFERENCES `vtiger_tab` (`tabid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_profile2utility` -- ALTER TABLE `vtiger_profile2utility` ADD CONSTRAINT `fk_1_profile2utility_activityid` FOREIGN KEY (`activityid`) REFERENCES `vtiger_actionmapping` (`actionid`) ON DELETE CASCADE, ADD CONSTRAINT `fk_1_profile2utility_profileid` FOREIGN KEY (`profileid`) REFERENCES `vtiger_profile` (`profileid`) ON DELETE CASCADE, ADD CONSTRAINT `fk_1_profile2utility_tabid` FOREIGN KEY (`tabid`) REFERENCES `vtiger_tab` (`tabid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_project` -- ALTER TABLE `vtiger_project` ADD CONSTRAINT `vtiger_project_ibfk_1` FOREIGN KEY (`projectid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_projectcf` -- ALTER TABLE `vtiger_projectcf` ADD CONSTRAINT `vtiger_projectcf_ibfk_1` FOREIGN KEY (`projectid`) REFERENCES `vtiger_project` (`projectid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_projectmilestone` -- ALTER TABLE `vtiger_projectmilestone` ADD CONSTRAINT `vtiger_projectmilestone_ibfk_1` FOREIGN KEY (`projectmilestoneid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_projectmilestonecf` -- ALTER TABLE `vtiger_projectmilestonecf` ADD CONSTRAINT `vtiger_projectmilestonecf_ibfk_1` FOREIGN KEY (`projectmilestoneid`) REFERENCES `vtiger_projectmilestone` (`projectmilestoneid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_projecttask` -- ALTER TABLE `vtiger_projecttask` ADD CONSTRAINT `vtiger_projecttask_ibfk_1` FOREIGN KEY (`projecttaskid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_projecttaskcf` -- ALTER TABLE `vtiger_projecttaskcf` ADD CONSTRAINT `vtiger_projecttaskcf_ibfk_1` FOREIGN KEY (`projecttaskid`) REFERENCES `vtiger_projecttask` (`projecttaskid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_relatedlists_fields` -- ALTER TABLE `vtiger_relatedlists_fields` ADD CONSTRAINT `fk_1_relatedlists_fields_fieldid` FOREIGN KEY (`fieldid`) REFERENCES `vtiger_field` (`fieldid`) ON DELETE CASCADE, ADD CONSTRAINT `vtiger_relatedlists_fields_ibfk_1` FOREIGN KEY (`relation_id`) REFERENCES `vtiger_relatedlists` (`relation_id`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_reservations` -- ALTER TABLE `vtiger_reservations` ADD CONSTRAINT `vtiger_reservations` FOREIGN KEY (`reservationsid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_reservationscf` -- ALTER TABLE `vtiger_reservationscf` ADD CONSTRAINT `vtiger_reservationscf` FOREIGN KEY (`reservationsid`) REFERENCES `vtiger_reservations` (`reservationsid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_role2picklist` -- ALTER TABLE `vtiger_role2picklist` ADD CONSTRAINT `fk_1_vtiger_role2picklist` FOREIGN KEY (`roleid`) REFERENCES `vtiger_role` (`roleid`) ON DELETE CASCADE, ADD CONSTRAINT `fk_2_vtiger_role2picklist` FOREIGN KEY (`picklistid`) REFERENCES `vtiger_picklist` (`picklistid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_role2profile` -- ALTER TABLE `vtiger_role2profile` ADD CONSTRAINT `vtiger_role2profile_ibfk_1` FOREIGN KEY (`roleid`) REFERENCES `vtiger_role` (`roleid`) ON DELETE CASCADE, ADD CONSTRAINT `vtiger_role2profile_ibfk_2` FOREIGN KEY (`profileid`) REFERENCES `vtiger_profile` (`profileid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_salesmanticketrel` -- ALTER TABLE `vtiger_salesmanticketrel` ADD CONSTRAINT `fk_2_vtiger_salesmanticketrel` FOREIGN KEY (`smid`) REFERENCES `vtiger_users` (`id`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_seattachmentsrel` -- ALTER TABLE `vtiger_seattachmentsrel` ADD CONSTRAINT `vtiger_seattachmentsrel_attachmentsid_fk` FOREIGN KEY (`attachmentsid`) REFERENCES `vtiger_attachments` (`attachmentsid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_senotesrel` -- ALTER TABLE `vtiger_senotesrel` ADD CONSTRAINT `fk_2_vtiger_senotesrel` FOREIGN KEY (`notesid`) REFERENCES `vtiger_notes` (`notesid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_seproductsrel` -- ALTER TABLE `vtiger_seproductsrel` ADD CONSTRAINT `fk_2_vtiger_seproductsrel` FOREIGN KEY (`productid`) REFERENCES `vtiger_products` (`productid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_service` -- ALTER TABLE `vtiger_service` ADD CONSTRAINT `fk_1_vtiger_service` FOREIGN KEY (`serviceid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_servicecf` -- ALTER TABLE `vtiger_servicecf` ADD CONSTRAINT `vtiger_servicecf_ibfk_1` FOREIGN KEY (`serviceid`) REFERENCES `vtiger_service` (`serviceid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_servicecontracts` -- ALTER TABLE `vtiger_servicecontracts` ADD CONSTRAINT `vtiger_servicecontracts_ibfk_1` FOREIGN KEY (`servicecontractsid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_servicecontractscf` -- ALTER TABLE `vtiger_servicecontractscf` ADD CONSTRAINT `vtiger_servicecontractscf_ibfk_1` FOREIGN KEY (`servicecontractsid`) REFERENCES `vtiger_servicecontracts` (`servicecontractsid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_settings_field` -- ALTER TABLE `vtiger_settings_field` ADD CONSTRAINT `fk_1_vtiger_settings_field` FOREIGN KEY (`blockid`) REFERENCES `vtiger_settings_blocks` (`blockid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_smsnotifier` -- ALTER TABLE `vtiger_smsnotifier` ADD CONSTRAINT `vtiger_smsnotifier_ibfk_1` FOREIGN KEY (`smsnotifierid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_smsnotifiercf` -- ALTER TABLE `vtiger_smsnotifiercf` ADD CONSTRAINT `vtiger_smsnotifiercf_ibfk_1` FOREIGN KEY (`smsnotifierid`) REFERENCES `vtiger_smsnotifier` (`smsnotifierid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_tab_info` -- ALTER TABLE `vtiger_tab_info` ADD CONSTRAINT `fk_1_vtiger_tab_info` FOREIGN KEY (`tabid`) REFERENCES `vtiger_tab` (`tabid`) ON DELETE CASCADE ON UPDATE CASCADE;
-- -- Constraints for table `vtiger_ticketcf` -- ALTER TABLE `vtiger_ticketcf` ADD CONSTRAINT `fk_1_vtiger_ticketcf` FOREIGN KEY (`ticketid`) REFERENCES `vtiger_troubletickets` (`ticketid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_tmp_read_group_rel_sharing_per` -- ALTER TABLE `vtiger_tmp_read_group_rel_sharing_per` ADD CONSTRAINT `fk_4_vtiger_tmp_read_group_rel_sharing_per` FOREIGN KEY (`userid`) REFERENCES `vtiger_users` (`id`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_tmp_read_group_sharing_per` -- ALTER TABLE `vtiger_tmp_read_group_sharing_per` ADD CONSTRAINT `fk_3_vtiger_tmp_read_group_sharing_per` FOREIGN KEY (`userid`) REFERENCES `vtiger_users` (`id`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_tmp_read_user_rel_sharing_per` -- ALTER TABLE `vtiger_tmp_read_user_rel_sharing_per` ADD CONSTRAINT `fk_4_vtiger_tmp_read_user_rel_sharing_per` FOREIGN KEY (`userid`) REFERENCES `vtiger_users` (`id`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_tmp_read_user_sharing_per` -- ALTER TABLE `vtiger_tmp_read_user_sharing_per` ADD CONSTRAINT `fk_3_vtiger_tmp_read_user_sharing_per` FOREIGN KEY (`userid`) REFERENCES `vtiger_users` (`id`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_tmp_write_group_rel_sharing_per` -- ALTER TABLE `vtiger_tmp_write_group_rel_sharing_per` ADD CONSTRAINT `fk_4_vtiger_tmp_write_group_rel_sharing_per` FOREIGN KEY (`userid`) REFERENCES `vtiger_users` (`id`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_tmp_write_group_sharing_per` -- ALTER TABLE `vtiger_tmp_write_group_sharing_per` ADD CONSTRAINT `fk_3_vtiger_tmp_write_group_sharing_per` FOREIGN KEY (`userid`) REFERENCES `vtiger_users` (`id`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_tmp_write_user_rel_sharing_per` -- ALTER TABLE `vtiger_tmp_write_user_rel_sharing_per` ADD CONSTRAINT `fk_4_vtiger_tmp_write_user_rel_sharing_per` FOREIGN KEY (`userid`) REFERENCES `vtiger_users` (`id`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_tmp_write_user_sharing_per` -- ALTER TABLE `vtiger_tmp_write_user_sharing_per` ADD CONSTRAINT `fk_3_vtiger_tmp_write_user_sharing_per` FOREIGN KEY (`userid`) REFERENCES `vtiger_users` (`id`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_trees_templates` -- ALTER TABLE `vtiger_trees_templates` ADD CONSTRAINT `vtiger_trees_templates_tabid_fk` FOREIGN KEY (`tabid`) REFERENCES `vtiger_tab` (`tabid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_trees_templates_data` -- ALTER TABLE `vtiger_trees_templates_data` ADD CONSTRAINT `vtiger_trees_templates_data_templateid` FOREIGN KEY (`templateid`) REFERENCES `vtiger_trees_templates` (`templateid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_troubletickets` -- ALTER TABLE `vtiger_troubletickets` ADD CONSTRAINT `fk_1_vtiger_troubletickets` FOREIGN KEY (`ticketid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_troubletickets_state_history` -- ALTER TABLE `vtiger_troubletickets_state_history` ADD CONSTRAINT `fk_1_vtiger_troubletickets_state_history` FOREIGN KEY (`crmid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_user2role` -- ALTER TABLE `vtiger_user2role` ADD CONSTRAINT `fk_2_vtiger_user2role` FOREIGN KEY (`userid`) REFERENCES `vtiger_users` (`id`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_users2group` -- ALTER TABLE `vtiger_users2group` ADD CONSTRAINT `fk_2_vtiger_users2group` FOREIGN KEY (`userid`) REFERENCES `vtiger_users` (`id`) ON DELETE CASCADE, ADD CONSTRAINT `vtiger_users2group_groupid_fk` FOREIGN KEY (`groupid`) REFERENCES `vtiger_groups` (`groupid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_user_module_preferences` -- ALTER TABLE `vtiger_user_module_preferences` ADD CONSTRAINT `fk_2_vtiger_user_module_preferences` FOREIGN KEY (`tabid`) REFERENCES `vtiger_tab` (`tabid`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `vtiger_user_module_preferences_default_cvid_fk` FOREIGN KEY (`default_cvid`) REFERENCES `vtiger_customview` (`cvid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_vendor` -- ALTER TABLE `vtiger_vendor` ADD CONSTRAINT `fk_1_vtiger_vendor` FOREIGN KEY (`vendorid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_vendoraddress` -- ALTER TABLE `vtiger_vendoraddress` ADD CONSTRAINT `vtiger_vendoraddress_ibfk_1` FOREIGN KEY (`vendorid`) REFERENCES `vtiger_vendor` (`vendorid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_vendorcf` -- ALTER TABLE `vtiger_vendorcf` ADD CONSTRAINT `fk_1_vtiger_vendorcf` FOREIGN KEY (`vendorid`) REFERENCES `vtiger_vendor` (`vendorid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_widgets` -- ALTER TABLE `vtiger_widgets` ADD CONSTRAINT `vtiger_widgets_ibfk_1` FOREIGN KEY (`tabid`) REFERENCES `vtiger_tab` (`tabid`) ON DELETE CASCADE;
-- -- Constraints for table `vtiger_ws_referencetype` -- ALTER TABLE `vtiger_ws_referencetype` ADD CONSTRAINT `fk_1_vtiger_referencetype` FOREIGN KEY (`fieldtypeid`) REFERENCES `vtiger_ws_fieldtype` (`fieldtypeid`) ON DELETE CASCADE;
-- -- Constraints for table `w_yf_api_session` -- ALTER TABLE `w_yf_api_session` ADD CONSTRAINT `w_yf_api_session_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `w_yf_api_user` (`id`) ON DELETE CASCADE;
-- -- Constraints for table `w_yf_api_user` -- ALTER TABLE `w_yf_api_user` ADD CONSTRAINT `w_yf_api_user_ibfk_1` FOREIGN KEY (`server_id`) REFERENCES `w_yf_servers` (`id`) ON DELETE CASCADE;
-- -- Constraints for table `w_yf_fields_server` -- ALTER TABLE `w_yf_fields_server` ADD CONSTRAINT `w_yf_fields_server_ibfk_1` FOREIGN KEY (`fieldid`) REFERENCES `vtiger_field` (`fieldid`) ON DELETE CASCADE, ADD CONSTRAINT `w_yf_fields_server_ibfk_2` FOREIGN KEY (`serverid`) REFERENCES `w_yf_servers` (`id`) ON DELETE CASCADE;
-- -- Constraints for table `w_yf_manage_consents_user` -- ALTER TABLE `w_yf_manage_consents_user` ADD CONSTRAINT `w_yf_manage_consents_user_fk1` FOREIGN KEY (`server_id`) REFERENCES `w_yf_servers` (`id`) ON DELETE CASCADE;
-- -- Constraints for table `w_yf_portal_session` -- ALTER TABLE `w_yf_portal_session` ADD CONSTRAINT `w_yf_portal_session_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `w_yf_portal_user` (`id`) ON DELETE CASCADE;
-- -- Constraints for table `w_yf_portal_user` -- ALTER TABLE `w_yf_portal_user` ADD CONSTRAINT `w_yf_portal_user_ibfk_1` FOREIGN KEY (`server_id`) REFERENCES `w_yf_servers` (`id`) ON DELETE CASCADE;
-- -- Constraints for table `w_yf_sms_user` -- ALTER TABLE `w_yf_sms_user` ADD CONSTRAINT `w_yf_sms_user_server_id_fk` FOREIGN KEY (`server_id`) REFERENCES `w_yf_servers` (`id`) ON DELETE CASCADE;
-- -- Constraints for table `yetiforce_currencyupdate` -- ALTER TABLE `yetiforce_currencyupdate` ADD CONSTRAINT `fk_1_vtiger_osscurrencies` FOREIGN KEY (`currency_id`) REFERENCES `vtiger_currency_info` (`id`) ON DELETE CASCADE;
-- -- Constraints for table `yetiforce_menu` -- ALTER TABLE `yetiforce_menu` ADD CONSTRAINT `yetiforce_menu_ibfk_1` FOREIGN KEY (`module`) REFERENCES `vtiger_tab` (`tabid`) ON DELETE CASCADE;
/*!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 */;