3 -- Host: localhost Database: phpgroupware
4 -- ------------------------------------------------------
7 -- Current Database: `phpgroupware`
10 CREATE DATABASE /*!32312 IF NOT EXISTS*/ `phpgroupware` /*!40100 DEFAULT CHARACTER SET latin1 */;
15 -- Table structure for table `tc_activity`
17 CREATE TABLE `tc_activity` (
18 `activity` int(16) unsigned NOT NULL auto_increment,
19 `assignment` int(16) unsigned NOT NULL,
20 `date` date default NULL,
22 PRIMARY KEY (`activity`),
23 KEY `assignment` (`assignment`)
24 ) ENGINE=MyISAM AUTO_INCREMENT=33 DEFAULT CHARSET=latin1;
27 -- Table structure for table `tc_appointment`
29 CREATE TABLE `tc_appointment` (
30 `appointment` int(16) unsigned NOT NULL auto_increment,
31 `presidency` int(16) unsigned NOT NULL default '0',
32 `family` int(16) unsigned default '0',
33 `individual` int(16) unsigned default '0',
34 `date` date NOT NULL default '0000-00-00',
35 `time` time NOT NULL default '00:00:00',
36 `location` varchar(120) default NULL,
37 `uid` bigint(64) unsigned NOT NULL default '0',
38 PRIMARY KEY (`appointment`)
39 ) ENGINE=MyISAM AUTO_INCREMENT=132 DEFAULT CHARSET=latin1;
42 -- Table structure for table `tc_assignment`
44 CREATE TABLE `tc_assignment` (
45 `assignment` int(12) unsigned NOT NULL auto_increment,
46 `name` varchar(60) NOT NULL,
47 `abbreviation` varchar(12) default NULL,
48 PRIMARY KEY (`assignment`)
49 ) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=latin1;
52 -- Dumping data for table `tc_assignment`
54 LOCK TABLES `tc_assignment` WRITE;
55 /*!40000 ALTER TABLE `tc_assignment` DISABLE KEYS */;
56 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');
57 /*!40000 ALTER TABLE `tc_assignment` ENABLE KEYS */;
61 -- Table structure for table `tc_attendance`
63 CREATE TABLE `tc_attendance` (
64 `individual` int(16) unsigned NOT NULL default '0',
65 `date` date default NULL,
66 KEY `individual` (`individual`)
67 ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
70 -- Table structure for table `tc_calling`
72 CREATE TABLE `tc_calling` (
73 `indiv_id` int(16) unsigned default NULL,
74 `name` varchar(30) default NULL,
75 `organization` varchar(30) default NULL,
76 `position` varchar(30) default NULL,
77 `sequence` int(16) unsigned default NULL,
78 `sustained` varchar(30) default NULL,
79 KEY `indiv_id` (`indiv_id`)
80 ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
83 -- Table structure for table `tc_companionship`
86 CREATE TABLE `tc_companionship` (
87 `companionship` int(16) unsigned NOT NULL default '0',
88 `individual` int(16) unsigned NOT NULL default '0',
89 `district` int(16) unsigned default NULL,
90 `scheduling_priority` int(16) unsigned default NULL,
91 `valid` tinyint(1) default NULL,
92 KEY `companionship` (`companionship`)
93 ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
96 -- Table structure for table `tc_district`
98 CREATE TABLE `tc_district` (
99 `district` int(16) unsigned NOT NULL default '0',
100 `name` varchar(30) default NULL,
101 `supervisor` int(16) unsigned default NULL,
102 `valid` tinyint(1) default NULL,
103 PRIMARY KEY (`district`)
104 ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
107 -- Table structure for table `tc_individual`
109 CREATE TABLE `tc_individual` (
110 `individual` int(16) unsigned NOT NULL auto_increment,
111 `mls_id` int(16) unsigned NOT NULL,
112 `name` varchar(60) default NULL,
113 `address` varchar(255) default NULL,
114 `phone` varchar(12) default NULL,
115 `email` varchar(120) default NULL,
116 `family` int(16) unsigned default NULL,
117 `hh_position` enum('Head of Household','Spouse','Other') DEFAULT 'Other',
118 `priesthood` enum('High Priest','Elder','Priest','Teacher','Deacon','Unordained') DEFAULT NULL,
119 `steward` enum('High Priest','Elder') DEFAULT NULL,
120 `scheduling_priority` int(16) unsigned default NULL,
121 `attending` tinyint(1) default '0',
122 `valid` tinyint(1) default NULL,
123 PRIMARY KEY (`individual`)
124 ) ENGINE=MyISAM AUTO_INCREMENT=105 DEFAULT CHARSET=latin1;
127 -- Table structure for table `tc_family`
129 CREATE TABLE `tc_family` (
130 `family` int(16) unsigned NOT NULL auto_increment,
131 `hofh_id` int(16) unsigned NOT NULL default '0',
132 `name` varchar(30) NOT NULL default '',
133 `name_id` varchar(30) NOT NULL default '',
134 `individual` int(16) unsigned default '0',
135 `companionship` int(16) unsigned default NULL,
136 `scheduling_priority` int(16) unsigned default NULL,
137 `valid` tinyint(1) default NULL,
138 PRIMARY KEY (`family`)
139 ) ENGINE=MyISAM AUTO_INCREMENT=277 DEFAULT CHARSET=latin1;
142 -- Table structure for table `tc_participation`
144 CREATE TABLE `tc_participation` (
145 `individual` int(16) unsigned NOT NULL default '0',
146 `activity` int(16) unsigned default NULL,
147 UNIQUE KEY `activity_ndx` (`individual`,`activity`)
148 ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
151 -- Table structure for table `tc_interview`
153 CREATE TABLE `tc_interview` (
154 `interview` int(16) unsigned NOT NULL auto_increment,
155 `interviewer` int(16) unsigned default NULL,
156 `individual` int(16) unsigned default NULL,
157 `date` date default NULL,
159 `interview_type` enum('hti','ppi') NOT NULL DEFAULT 'hti',
161 ) ENGINE=MyISAM AUTO_INCREMENT=248 DEFAULT CHARSET=latin1;
165 -- Table structure for table `tc_presidency`
167 CREATE TABLE `tc_presidency` (
168 `presidency` int(16) unsigned NOT NULL auto_increment,
169 `individual` int(16) unsigned NOT NULL default '0',
170 `district` int(16) unsigned default '0',
171 `name` varchar(60) NOT NULL,
172 `email` varchar(60) NOT NULL,
173 `president` tinyint(1) default '0',
174 `counselor` tinyint(1) default '0',
175 `secretary` tinyint(1) default '0',
176 `valid` tinyint(1) default '1',
177 KEY `presidency` (`presidency`),
178 KEY `individual` (`individual`)
179 ) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;
182 -- Table structure for table `tc_visit`
184 CREATE TABLE `tc_visit` (
185 `visit` int(16) unsigned NOT NULL auto_increment,
186 `family` int(16) unsigned default NULL,
187 `companionship` int(16) unsigned default NULL,
188 `companion1` int(16) unsigned default NULL,
189 `companion2` int(16) unsigned default NULL,
190 `date` date default NULL,
192 `visited` enum('y','n','') default NULL,
193 `visit_type` enum('presidency','hometeaching') not null default 'hometeaching',
194 PRIMARY KEY (`visit`)
195 ) ENGINE=MyISAM AUTO_INCREMENT=9513 DEFAULT CHARSET=latin1;
198 -- Table structure for table `tc_willingness`
200 CREATE TABLE `tc_willingness` (
201 `individual` int(16) unsigned NOT NULL,
202 `assignment` int(16) unsigned NOT NULL,
203 `willing` enum('y','n','') NOT NULL,
204 KEY `individual` (`individual`,`assignment`)
205 ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
208 -- Table structure for table `tc_scheduling_priority`
210 CREATE TABLE `phpgroupware`.`tc_scheduling_priority` (
211 `scheduling_priority` INT( 16 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
212 `priority` INT( 10 ) UNSIGNED NOT NULL DEFAULT '30',
213 `notes` VARCHAR( 128 ) NOT NULL DEFAULT ''
217 -- Table structure for table `tc_email_list`
219 CREATE TABLE `phpgroupware`.`tc_email_list` (
220 `email_list` INT( 16 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
221 `name` VARCHAR( 128 ) NULL DEFAULT NULL
225 -- Table structure for table `tc_email_list_membership`
227 CREATE TABLE `phpgroupware`.`tc_email_list_membership` (
228 `individual` INT( 16 ) UNSIGNED NULL DEFAULT NULL ,
229 `email_list` INT( 16 ) UNSIGNED NULL DEFAULT NULL