CREATE ALGORITHM=TEMPTABLE DEFINER=`prideweb`@`208.97.128.0/255.255.192.0` SQL SECURITY DEFINER VIEW `netoffice`.`sso_no_members` AS select `cc`.`id` AS `id`,`co`.`organization_name` AS `organization`,`du`.`name` AS `login`,`du`.`pass` AS `password`,concat(`ci`.`first_name`,_utf8' ',`ci`.`last_name`) AS `name`,NULL AS `title`,`cew`.`email` AS `email_work`,`ceh`.`email` AS `email_home`,`cpw`.`phone` AS `phone_work`,`cph`.`phone` AS `phone_home`,if(`cphm`.`phone`,`cphm`.`phone`,`cpwm`.`phone`) AS `mobile`,if(`cphf`.`phone`,`cphf`.`phone`,`cpwf`.`phone`) AS `fax`,NULL AS `comments`,`ccp`.`profil` AS `profil`,`du`.`created` AS `created`,0 AS `logout_time`,NULL AS `last_page`,0 AS `timezone`,0 AS `location`,0 AS `supervisor`,0 AS `agent`,_utf8'default' AS `theme`,0 AS `layout`,1 AS `timeticket` from (((((((((((((((`civicrm`.`civicrm_contact` `cc` join `civicrm`.`civicrm_uf_match` `cm` on(((`cc`.`id` = `cm`.`contact_id`) and (`cc`.`domain_id` = `cm`.`domain_id`)))) join `drupal`.`users` `du` on((`cm`.`uf_id` = `du`.`uid`))) join `civicrm`.`civicrm_individual` `ci` on((`ci`.`contact_id` = `cc`.`id`))) left join `civicrm`.`civicrm_organization` `co` on((`co`.`contact_id` = `cc`.`id`))) left join `civicrm`.`civicrm_location_work` `clw` on((`clw`.`entity_id` = `cc`.`id`))) left join `civicrm`.`civicrm_email` `cew` on((`clw`.`id` = `cew`.`location_id`))) left join `civicrm`.`civicrm_phone_phone` `cpw` on((`clw`.`id` = `cpw`.`location_id`))) left join `civicrm`.`civicrm_phone_mobile` `cpwm` on((`clw`.`id` = `cpwm`.`location_id`))) left join `civicrm`.`civicrm_phone_fax` `cpwf` on((`clw`.`id` = `cpwf`.`location_id`))) left join `civicrm`.`civicrm_location_home` `clh` on((`clh`.`entity_id` = `cc`.`id`))) left join `civicrm`.`civicrm_email` `ceh` on((`clh`.`id` = `ceh`.`location_id`))) left join `civicrm`.`civicrm_phone_phone` `cph` on((`clh`.`id` = `cph`.`location_id`))) left join `civicrm`.`civicrm_phone_mobile` `cphm` on((`clw`.`id` = `cpwm`.`location_id`))) left join `civicrm`.`civicrm_phone_fax` `cphf` on((`clw`.`id` = `cpwf`.`location_id`))) left join `civicrm`.`civicrm_contact_profile` `ccp` on((`ccp`.`contact_id` = `cc`.`id`))) civicrm_contact |CREATE TABLE `civicrm_contact` ( `nick_name` varchar(128) collate utf8_unicode_ci default NULL COMMENT 'Nick Name.', `domain_id` int(10) unsigned NOT NULL COMMENT 'Which Domain owns this contact', `contact_type` enum('Individual','Organization','Household') collate utf8_unicode_ci default NULL COMMENT 'Type of Contact.', `do_not_email` tinyint(4) default '0', `do_not_phone` tinyint(4) default '0', `do_not_mail` tinyint(4) default '0', `contact_sub_type` varchar(64) collate utf8_unicode_ci default NULL COMMENT 'May be used to over-ride contact view and edit templates.', `legal_identifier` varchar(32) collate utf8_unicode_ci default NULL COMMENT 'May be used for SSN, EIN/TIN, Household ID (census) or other applicable unique legal/government ID.', `external_identifier` varchar(32) collate utf8_unicode_ci default NULL COMMENT 'Unique trusted external ID (generally from a legacy app/datasource). Particularly useful for deduping operations.', `sort_name` varchar(128) collate utf8_unicode_ci default NULL COMMENT 'Name used for sorting different contact types', `display_name` varchar(128) collate utf8_unicode_ci default NULL COMMENT 'Formatted name representing preferred format for display/print/other output.', `home_URL` varchar(128) collate utf8_unicode_ci default NULL COMMENT 'optional "home page" URL for this contact.', `image_URL` varchar(128) collate utf8_unicode_ci default NULL COMMENT 'optional URL for preferred image (photo, logo, etc.) to display for this contact.', `preferred_communication_method` varchar(255) collate utf8_unicode_ci default NULL COMMENT 'What is the preferred mode of communication.', `preferred_mail_format` enum('Text','HTML','Both') collate utf8_unicode_ci default 'Both' COMMENT 'What is the preferred mode of sending an email.', `do_not_trade` tinyint(4) default '0', `hash` varchar(32) collate utf8_unicode_ci default NULL COMMENT 'Key for validating requests related to this contact.', `is_opt_out` tinyint(4) NOT NULL default '0' COMMENT 'Has the contact opted out from receiving all bulk email from the organization or site domain?', `id` int(10) unsigned NOT NULL auto_increment COMMENT 'Unique Contact ID', `source` varchar(255) collate utf8_unicode_ci default NULL COMMENT 'where domain_id contact come from, e.g. import, donate module insert...', PRIMARY KEY (`id`), KEY `index_sort_name_domain` (`sort_name`,`domain_id`), KEY `index_contact_type_domain` (`contact_type`,`domain_id`), KEY `index_contact_sub_type_domain` (`contact_sub_type`,`domain_id`), KEY `index_hash_domain` (`hash`,`domain_id`), KEY `index_preferred_communication_method` (`preferred_communication_method`), KEY `domain_id` (`domain_id`), CONSTRAINT `civicrm_contact_ibfk_1` FOREIGN KEY (`domain_id`) REFERENCES `civicrm_domain` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci | | civicrm_uf_match | CREATE TABLE `civicrm_uf_match` ( `id` int(10) unsigned NOT NULL auto_increment COMMENT 'System generated ID.', `uf_id` int(10) unsigned NOT NULL COMMENT 'UF ID', `contact_id` int(10) unsigned NOT NULL COMMENT 'FK to Contact ID', `domain_id` int(10) unsigned NOT NULL COMMENT 'Which Domain owns this contact (cached here for ease of use reasons)', `email` varchar(64) collate utf8_unicode_ci default NULL COMMENT 'Email address', PRIMARY KEY (`id`), UNIQUE KEY `UI_uf_id` (`uf_id`), UNIQUE KEY `UI_contact` (`contact_id`), KEY `domain_id` (`domain_id`), CONSTRAINT `civicrm_uf_match_ibfk_1` FOREIGN KEY (`contact_id`) REFERENCES `civicrm_contact` (`id`), CONSTRAINT `civicrm_uf_match_ibfk_2` FOREIGN KEY (`domain_id`) REFERENCES `civicrm_domain` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci | | users | CREATE TABLE `users` ( `uid` int(10) unsigned NOT NULL default '0', `name` varchar(60) NOT NULL default '', `pass` varchar(32) NOT NULL default '', `mail` varchar(64) default '', `mode` tinyint(4) NOT NULL default '0', `sort` tinyint(4) default '0', `threshold` tinyint(4) default '0', `theme` varchar(255) NOT NULL default '', `signature` varchar(255) NOT NULL default '', `created` int(11) NOT NULL default '0', `access` int(11) NOT NULL default '0', `login` int(11) NOT NULL default '0', `status` tinyint(4) NOT NULL default '0', `timezone` varchar(8) default NULL, `language` varchar(12) NOT NULL default '', `picture` varchar(255) NOT NULL default '', `init` varchar(64) default '', `data` longtext, PRIMARY KEY (`uid`), UNIQUE KEY `name` (`name`), KEY `access` (`access`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 | | civicrm_individual |CREATE TABLE `civicrm_individual` ( `id` int(10) unsigned NOT NULL auto_increment COMMENT 'Unique Individual ID', `contact_id` int(10) unsigned NOT NULL COMMENT 'FK to Contact ID', `first_name` varchar(64) collate utf8_unicode_ci default NULL COMMENT 'First Name.', `middle_name` varchar(64) collate utf8_unicode_ci default NULL COMMENT 'Middle Name.', `last_name` varchar(64) collate utf8_unicode_ci default NULL COMMENT 'Last Name.', `prefix_id` int(10) unsigned default NULL COMMENT 'Prefix or Title for name (Ms, Mr...). FK to prefix ID', `suffix_id` int(10) unsigned default NULL COMMENT 'Suffix for name (Jr, Sr...). FK to suffix ID', `greeting_type` enum('Formal','Informal','Honorific','Custom','Other') collate utf8_unicode_ci default NULL COMMENT 'Preferred greeting format.', `custom_greeting` varchar(128) collate utf8_unicode_ci default NULL COMMENT 'Custom greeting message.', `job_title` varchar(64) collate utf8_unicode_ci default NULL COMMENT 'Job Title', `gender_id` int(10) unsigned default NULL COMMENT 'FK to gender ID', `birth_date` date default NULL COMMENT 'Date of birth', `is_deceased` tinyint(4) default '0', `deceased_date` date default NULL COMMENT 'Date of deceased', `phone_to_household_id` int(10) unsigned default NULL COMMENT 'OPTIONAL FK to civicrm_contact_household record. If NOT NULL, direct phone communications to household rather than individual location.', `email_to_household_id` int(10) unsigned default NULL COMMENT 'OPTIONAL FK to civicrm_contact_household record. If NOT NULL, direct phone communications to household rather than individual location.', `mail_to_household_id` int(10) unsigned default NULL COMMENT 'OPTIONAL FK to civicrm_contact_household record. If NOT NULL, direct mail communications to household rather than individual location.', PRIMARY KEY (`id`), UNIQUE KEY `UI_contact` (`contact_id`), KEY `UI_prefix` (`prefix_id`), KEY `UI_suffix` (`suffix_id`), KEY `UI_gender` (`gender_id`), CONSTRAINT `civicrm_individual_ibfk_1` FOREIGN KEY (`contact_id`) REFERENCES `civicrm_contact` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci | | civicrm_organization | CREATE TABLE `civicrm_organization` ( `id` int(10) unsigned NOT NULL auto_increment COMMENT 'Unique Organization ID', `contact_id` int(10) unsigned NOT NULL COMMENT 'FK to Contact ID', `organization_name` varchar(128) collate utf8_unicode_ci default NULL COMMENT 'Organization Name.', `legal_name` varchar(128) collate utf8_unicode_ci default NULL COMMENT 'Legal Name.', `sic_code` varchar(8) collate utf8_unicode_ci default NULL COMMENT 'Standard Industry Classification Code.', `primary_contact_id` int(10) unsigned default NULL COMMENT 'Optional FK to Primary Contact for this organization.', PRIMARY KEY (`id`), UNIQUE KEY `UI_contact` (`contact_id`), KEY `primary_contact_id` (`primary_contact_id`), CONSTRAINT `civicrm_organization_ibfk_1` FOREIGN KEY (`contact_id`) REFERENCES `civicrm_contact` (`id`), CONSTRAINT `civicrm_organization_ibfk_2` FOREIGN KEY (`primary_contact_id`) REFERENCES `civicrm_contact` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci | | civicrm_location_home | CREATE ALGORITHM=TEMPTABLE DEFINER=`prideweb`@`208.97.128.0/255.255.192.0` SQL SECURITY DEFINER VIEW `civicrm`.`civicrm_location_home` AS select `civicrm`.`civicrm_location`.`id` AS `id`,`civicrm`.`civicrm_location`.`entity_id` AS `entity_id` from `civicrm`.`civicrm_location` where ((`civicrm`.`civicrm_location`.`entity_table` = _utf8'civicrm_contact') and (`civicrm`.`civicrm_location`.`location_type_id` = 1)) | | civicrm_location_work | CREATE ALGORITHM=TEMPTABLE DEFINER=`prideweb`@`208.97.128.0/255.255.192.0` SQL SECURITY DEFINER VIEW `civicrm`.`civicrm_location_work` AS select `civicrm`.`civicrm_location`.`id` AS `id`,`civicrm`.`civicrm_location`.`entity_id` AS `entity_id` from `civicrm`.`civicrm_location` where ((`civicrm`.`civicrm_location`.`entity_table` = _utf8'civicrm_contact') and (`civicrm`.`civicrm_location`.`location_type_id` = 2)) | | civicrm_email | CREATE TABLE `civicrm_email` ( `id` int(10) unsigned NOT NULL auto_increment COMMENT 'Unique Email ID', `location_id` int(10) unsigned NOT NULL COMMENT 'Which Location does this email belong to.', `email` varchar(64) collate utf8_unicode_ci default NULL COMMENT 'Email address', `is_primary` tinyint(4) default '0' COMMENT 'Is this the primary email for this contact and location.', `on_hold` tinyint(4) NOT NULL default '0' COMMENT 'Is this address on bounce hold?', `hold_date` datetime default NULL COMMENT 'When the address went on bounce hold', `reset_date` datetime default NULL COMMENT 'When the address bounce status was last reset', PRIMARY KEY (`id`), KEY `UI_email` (`email`), KEY `location_id` (`location_id`), CONSTRAINT `civicrm_email_ibfk_1` FOREIGN KEY (`location_id`) REFERENCES `civicrm_location` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci | | civicrm_phone_phone | CREATE ALGORITHM=TEMPTABLE DEFINER=`prideweb`@`208.97.128.0/255.255.192.0` SQL SECURITY DEFINER VIEW `civicrm`.`civicrm_phone_phone` AS select `civicrm`.`civicrm_phone`.`phone` AS `phone`,`civicrm`.`civicrm_phone`.`location_id` AS `location_id` from `civicrm`.`civicrm_phone` where (`civicrm`.`civicrm_phone`.`phone_type` = _utf8'Phone') | | civicrm_phone_mobile | CREATE ALGORITHM=TEMPTABLE DEFINER=`prideweb`@`208.97.128.0/255.255.192.0` SQL SECURITY DEFINER VIEW `civicrm`.`civicrm_phone_mobile` AS select `civicrm`.`civicrm_phone`.`phone` AS `phone`,`civicrm`.`civicrm_phone`.`location_id` AS `location_id` from `civicrm`.`civicrm_phone` where (`civicrm`.`civicrm_phone`.`phone_type` = _utf8'Mobile') | | civicrm_phone_fax | CREATE ALGORITHM=TEMPTABLE DEFINER=`prideweb`@`208.97.128.0/255.255.192.0` SQL SECURITY DEFINER VIEW `civicrm`.`civicrm_phone_fax` AS select `civicrm`.`civicrm_phone`.`phone` AS `phone`,`civicrm`.`civicrm_phone`.`location_id` AS `location_id` from `civicrm`.`civicrm_phone` where (`civicrm`.`civicrm_phone`.`phone_type` = _utf8'Fax') |