X-Git-Url: http://git.pippins.net/embedvideo/.git/static/git-logo.png?a=blobdiff_plain;f=sql%2Ftc.sql;h=25eae9aa6d3f036e7bcb94a134e8bff1524a9fe7;hb=53b9dc59fa5aabe9c55b109d158c5db379955013;hp=23067212cd69b0cef6f8fc2f73e67aa4ec9b8f86;hpb=8abee5d598cfb1b52e0d1b929db6dc6c33f5bddd;p=eq%2F.git diff --git a/sql/tc.sql b/sql/tc.sql index 2306721..25eae9a 100644 --- a/sql/tc.sql +++ b/sql/tc.sql @@ -30,7 +30,7 @@ CREATE TABLE `tc_appointment` ( `appointment` int(16) unsigned NOT NULL auto_increment, `presidency` int(16) unsigned NOT NULL default '0', `family` int(16) unsigned default '0', - `indiv` int(16) unsigned default '0', + `individual` int(16) unsigned default '0', `date` date NOT NULL default '0000-00-00', `time` time NOT NULL default '00:00:00', `location` varchar(120) default NULL, @@ -44,7 +44,7 @@ CREATE TABLE `tc_appointment` ( CREATE TABLE `tc_assignment` ( `assignment` int(12) unsigned NOT NULL auto_increment, `name` varchar(60) NOT NULL, - `code` varchar(12) default NULL, + `abbreviation` varchar(12) default NULL, PRIMARY KEY (`assignment`) ) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=latin1; @@ -53,7 +53,7 @@ CREATE TABLE `tc_assignment` ( -- LOCK TABLES `tc_assignment` WRITE; /*!40000 ALTER TABLE `tc_assignment` DISABLE KEYS */; -INSERT INTO `tc_assignment` (`assignment`, `name`, `code`) VALUES (1,'Enrichment Night Babysitting','RS'),(2,'Building Lockup','LU'),(3,'Building Cleaning Coordinator','CC'),(4,'Missionary Splits','MS'),(5,'Stake Farm','SF'),(6,'Loveland Kitchen','LK'),(7,'Moves','MV'),(8,'Temple Kitchen & Laundary','TKL'),(9,'Temple Sealings','TS'),(10,'Temple Initatories','TI'); +INSERT INTO `tc_assignment` (`assignment`, `name`, `abbreviation`) VALUES (1,'Enrichment Night Babysitting','RS'),(2,'Building Lockup','LU'),(3,'Building Cleaning Coordinator','CC'),(4,'Missionary Splits','MS'),(5,'Stake Farm','SF'),(6,'Loveland Kitchen','LK'),(7,'Moves','MV'),(8,'Temple Kitchen & Laundary','TKL'),(9,'Temple Sealings','TS'),(10,'Temple Initatories','TI'); /*!40000 ALTER TABLE `tc_assignment` ENABLE KEYS */; UNLOCK TABLES; @@ -61,68 +61,71 @@ UNLOCK TABLES; -- Table structure for table `tc_attendance` -- CREATE TABLE `tc_attendance` ( - `indiv` int(16) unsigned NOT NULL default '0', + `individual` int(16) unsigned NOT NULL default '0', `date` date default NULL, - KEY `indiv` (`indiv`) + KEY `individual` (`individual`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -- Table structure for table `tc_calling` -- CREATE TABLE `tc_calling` ( - `indiv_id` int(16) unsigned default NULL, - `name` varchar(30) default NULL, + `individual` int(16) unsigned default '0', `organization` varchar(30) default NULL, `position` varchar(30) default NULL, - `sequence` int(16) unsigned default NULL, `sustained` varchar(30) default NULL, - KEY `indiv_id` (`indiv_id`) + KEY `individual` (`individual`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- --- Table structure for table `tc_companionship` +-- Table structure for table `tc_companion` -- +CREATE TABLE `phpgroupware`.`tc_companion` ( + `companion` INT( 16 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , + `individual` INT( 16 ) UNSIGNED NOT NULL , + `companionship` INT( 16 ) UNSIGNED NOT NULL , + `scheduling_priority` INT( 16 ) UNSIGNED NOT NULL , + `valid` TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT '0' +) ENGINE = MYISAM ; -CREATE TABLE `tc_companionship` ( - `companionship` int(16) unsigned NOT NULL default '0', - `indiv` int(16) unsigned NOT NULL default '0', - `district` int(16) unsigned default NULL, - `valid` tinyint(1) default NULL, - KEY `companionship` (`companionship`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; +-- +-- Table structure for table `tc_companionship` +-- +CREATE TABLE `phpgroupware`.`tc_companionship` ( + `companionship` INT( 16 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , + `mls_id` INT( 16 ) UNSIGNED NULL DEFAULT NULL , + `district` INT( 16 ) UNSIGNED NULL DEFAULT NULL , + `valid` TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT '1' +) ENGINE = MYISAM ; -- -- Table structure for table `tc_district` -- CREATE TABLE `tc_district` ( `district` int(16) unsigned NOT NULL default '0', - `name` varchar(30) default NULL, `supervisor` int(16) unsigned default NULL, `valid` tinyint(1) default NULL, PRIMARY KEY (`district`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- --- Table structure for table `tc_indiv` +-- Table structure for table `tc_individual` -- -CREATE TABLE `tc_indiv` ( - `indiv` int(16) unsigned NOT NULL auto_increment, - `indiv_id` int(16) unsigned NOT NULL, +CREATE TABLE `tc_individual` ( + `individual` int(16) unsigned NOT NULL auto_increment, + `mls_id` int(16) unsigned NOT NULL, `name` varchar(60) default NULL, + `fullname` varchar(60) default NULL, `address` varchar(255) default NULL, `phone` varchar(12) default NULL, `email` varchar(120) default NULL, - `family` int(16) unsigned default NULL, `hh_position` enum('Head of Household','Spouse','Other') DEFAULT 'Other', `priesthood` enum('High Priest','Elder','Priest','Teacher','Deacon','Unordained') DEFAULT NULL, `steward` enum('High Priest','Elder') DEFAULT NULL, - `ppi_pri` int(10) unsigned NOT NULL default '1', - `ppi_notes` varchar(128) default NULL, - `hti_pri` int(10) unsigned default '1', - `hti_notes` varchar(128) default NULL, + `scheduling_priority` int(16) unsigned default NULL, `attending` tinyint(1) default '0', `valid` tinyint(1) default NULL, - PRIMARY KEY (`indiv`) + PRIMARY KEY (`individual`) ) ENGINE=MyISAM AUTO_INCREMENT=105 DEFAULT CHARSET=latin1; -- @@ -130,13 +133,9 @@ CREATE TABLE `tc_indiv` ( -- CREATE TABLE `tc_family` ( `family` int(16) unsigned NOT NULL auto_increment, - `hofh_id` int(16) unsigned NOT NULL default '0', - `name` varchar(30) NOT NULL default '', - `name_id` varchar(30) NOT NULL default '', - `indiv_id` int(16) unsigned default '0', + `individual` int(16) unsigned default '0', `companionship` int(16) unsigned default NULL, - `visit_pri` int(10) unsigned default '1', - `visit_notes` varchar(128) default NULL, + `scheduling_priority` int(16) unsigned default NULL, `valid` tinyint(1) default NULL, PRIMARY KEY (`family`) ) ENGINE=MyISAM AUTO_INCREMENT=277 DEFAULT CHARSET=latin1; @@ -145,9 +144,9 @@ CREATE TABLE `tc_family` ( -- Table structure for table `tc_participation` -- CREATE TABLE `tc_participation` ( - `indiv` int(16) unsigned NOT NULL default '0', + `individual` int(16) unsigned NOT NULL default '0', `activity` int(16) unsigned default NULL, - UNIQUE KEY `activity_ndx` (`indiv`,`activity`) + UNIQUE KEY `activity_ndx` (`individual`,`activity`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- @@ -156,11 +155,11 @@ CREATE TABLE `tc_participation` ( CREATE TABLE `tc_interview` ( `interview` int(16) unsigned NOT NULL auto_increment, `interviewer` int(16) unsigned default NULL, - `indiv` int(16) unsigned default NULL, + `individual` int(16) unsigned default NULL, `date` date default NULL, `notes` text, `interview_type` enum('hti','ppi') NOT NULL DEFAULT 'hti', - PRIMARY KEY (`ppi`) + PRIMARY KEY (`interview`) ) ENGINE=MyISAM AUTO_INCREMENT=248 DEFAULT CHARSET=latin1; @@ -169,16 +168,15 @@ CREATE TABLE `tc_interview` ( -- CREATE TABLE `tc_presidency` ( `presidency` int(16) unsigned NOT NULL auto_increment, - `indiv` int(16) unsigned NOT NULL default '0', + `individual` int(16) unsigned NOT NULL default '0', `district` int(16) unsigned default '0', - `name` varchar(60) NOT NULL, `email` varchar(60) NOT NULL, `president` tinyint(1) default '0', `counselor` tinyint(1) default '0', `secretary` tinyint(1) default '0', `valid` tinyint(1) default '1', KEY `presidency` (`presidency`), - KEY `indiv` (`indiv`) + KEY `individual` (`individual`) ) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=latin1; -- @@ -201,8 +199,53 @@ CREATE TABLE `tc_visit` ( -- Table structure for table `tc_willingness` -- CREATE TABLE `tc_willingness` ( - `indiv` int(16) unsigned NOT NULL, + `individual` int(16) unsigned NOT NULL, `assignment` int(16) unsigned NOT NULL, `willing` enum('y','n','') NOT NULL, - KEY `indiv` (`indiv`,`assignment`) + KEY `individual` (`individual`,`assignment`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; + +-- +-- Table structure for table `tc_scheduling_priority` +-- +CREATE TABLE `tc_scheduling_priority` ( + `scheduling_priority` INT( 16 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , + `priority` INT( 10 ) UNSIGNED NOT NULL DEFAULT '30', + `notes` VARCHAR( 128 ) NOT NULL DEFAULT '' +) ENGINE = MYISAM ; + +-- +-- Table structure for table `tc_email_list` +-- +CREATE TABLE `tc_email_list` ( + `email_list` INT( 16 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , + `name` VARCHAR( 128 ) NULL DEFAULT NULL +) ENGINE = MYISAM ; + +-- +-- Table structure for table `tc_email_list_membership` +-- +CREATE TABLE `tc_email_list_membership` ( + `individual` INT( 16 ) UNSIGNED NULL DEFAULT NULL , + `email_list` INT( 16 ) UNSIGNED NULL DEFAULT NULL +) ENGINE = MYISAM ; + +-- +-- Table structure for table `tc_accomplishment` +-- +CREATE TABLE `tc_accomplishment` ( + `accomplishment` INT( 16 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , + `individual` INT( 16 ) UNSIGNED NULL DEFAULT NULL , + `date` DATE NULL DEFAULT NULL , + `task` INT( 16 ) UNSIGNED NULL DEFAULT NULL , + `note` VARCHAR( 128 ) NOT NULL +) ENGINE = MYISAM ; + +-- +-- Table structure for table `tc_task` +-- +CREATE TABLE `tc_task` ( + `task` INT( 16 ) NOT NULL AUTO_INCREMENT PRIMARY KEY , + `name` VARCHAR( 128 ) NOT NULL , + `description` VARCHAR( 128 ) NOT NULL +) ENGINE = MYISAM ;