c42555ea1519e960c8f1296658cf14b9654b493a
[eq/.git] / sql / tc.sql
1 -- MySQL dump 10.11
2 --
3 -- Host: localhost    Database: phpgroupware
4 -- ------------------------------------------------------
5
6 --
7 -- Current Database: `phpgroupware`
8 --
9
10 CREATE DATABASE /*!32312 IF NOT EXISTS*/ `phpgroupware` /*!40100 DEFAULT CHARACTER SET latin1 */;
11
12 USE `phpgroupware`;
13
14 --
15 -- Table structure for table `tc_activity`
16 --
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,
21   `notes` text,
22   PRIMARY KEY  (`activity`),
23   KEY `assignment` (`assignment`)
24 ) ENGINE=MyISAM AUTO_INCREMENT=33 DEFAULT CHARSET=latin1;
25
26 --
27 -- Table structure for table `tc_appointment`
28 --
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;
40
41 --
42 -- Table structure for table `tc_assignment`
43 --
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;
50
51 --
52 -- Dumping data for table `tc_assignment`
53 --
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 */;
58 UNLOCK TABLES;
59
60 --
61 -- Table structure for table `tc_attendance`
62 --
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;
68
69 --
70 -- Table structure for table `tc_calling`
71 --
72 CREATE TABLE `tc_calling` (
73   `name` varchar(30) default NULL,
74   `organization` varchar(30) default NULL,
75   `position` varchar(30) default NULL,
76   `sustained` varchar(30) default NULL,
77 ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
78
79 --
80 -- Table structure for table `tc_companionship`
81 --
82
83 CREATE TABLE `tc_companionship` (
84   `companionship` int(16) unsigned NOT NULL default '0',
85   `individual` int(16) unsigned NOT NULL default '0',
86   `district` int(16) unsigned default NULL,
87   `scheduling_priority` int(16) unsigned default NULL,
88   `valid` tinyint(1) default NULL,
89   KEY `companionship` (`companionship`)
90 ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
91
92 --
93 -- Table structure for table `tc_district`
94 --
95 CREATE TABLE `tc_district` (
96   `district` int(16) unsigned NOT NULL default '0',
97   `name` varchar(30) default NULL,
98   `supervisor` int(16) unsigned default NULL,
99   `valid` tinyint(1) default NULL,
100   PRIMARY KEY  (`district`)
101 ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
102
103 --
104 -- Table structure for table `tc_individual`
105 --
106 CREATE TABLE `tc_individual` (
107   `individual` int(16) unsigned NOT NULL auto_increment,
108   `mls_id` int(16) unsigned NOT NULL,
109   `name` varchar(60) default NULL,
110   `address` varchar(255) default NULL,
111   `phone` varchar(12) default NULL,
112   `email` varchar(120) default NULL,
113   `hh_position` enum('Head of Household','Spouse','Other') DEFAULT 'Other',
114   `priesthood` enum('High Priest','Elder','Priest','Teacher','Deacon','Unordained') DEFAULT NULL,
115   `steward` enum('High Priest','Elder') DEFAULT NULL,
116   `scheduling_priority` int(16) unsigned default NULL,
117   `attending` tinyint(1) default '0',
118   `valid` tinyint(1) default NULL,
119   PRIMARY KEY  (`individual`)
120 ) ENGINE=MyISAM AUTO_INCREMENT=105 DEFAULT CHARSET=latin1;
121
122 --
123 -- Table structure for table `tc_family`
124 --
125 CREATE TABLE `tc_family` (
126   `family` int(16) unsigned NOT NULL auto_increment,
127   `hofh_id` int(16) unsigned NOT NULL default '0',
128   `name` varchar(30) NOT NULL default '',
129   `name_id` varchar(30) NOT NULL default '',
130   `individual` int(16) unsigned default '0',
131   `companionship` int(16) unsigned default NULL,
132   `scheduling_priority` int(16) unsigned default NULL,
133   `valid` tinyint(1) default NULL,
134   PRIMARY KEY  (`family`)
135 ) ENGINE=MyISAM AUTO_INCREMENT=277 DEFAULT CHARSET=latin1;
136
137 --
138 -- Table structure for table `tc_participation`
139 --
140 CREATE TABLE `tc_participation` (
141   `individual` int(16) unsigned NOT NULL default '0',
142   `activity` int(16) unsigned default NULL,
143   UNIQUE KEY `activity_ndx` (`individual`,`activity`)
144 ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
145
146 --
147 -- Table structure for table `tc_interview`
148 --
149 CREATE TABLE `tc_interview` (
150   `interview` int(16) unsigned NOT NULL auto_increment,
151   `interviewer` int(16) unsigned default NULL,
152   `individual` int(16) unsigned default NULL,
153   `date` date default NULL,
154   `notes` text,
155   `interview_type` enum('hti','ppi') NOT NULL DEFAULT 'hti',
156   PRIMARY KEY  (`ppi`)
157 ) ENGINE=MyISAM AUTO_INCREMENT=248 DEFAULT CHARSET=latin1;
158
159
160 --
161 -- Table structure for table `tc_presidency`
162 --
163 CREATE TABLE `tc_presidency` (
164   `presidency` int(16) unsigned NOT NULL auto_increment,
165   `individual` int(16) unsigned NOT NULL default '0',
166   `district` int(16) unsigned default '0',
167   `name` varchar(60) NOT NULL,
168   `email` varchar(60) NOT NULL,
169   `president` tinyint(1) default '0',
170   `counselor` tinyint(1) default '0',
171   `secretary` tinyint(1) default '0',
172   `valid` tinyint(1) default '1',
173   KEY `presidency` (`presidency`),
174   KEY `individual` (`individual`)
175 ) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;
176
177 --
178 -- Table structure for table `tc_visit`
179 --
180 CREATE TABLE `tc_visit` (
181   `visit` int(16) unsigned NOT NULL auto_increment,
182   `family` int(16) unsigned default NULL,
183   `companionship` int(16) unsigned default NULL,
184   `companion1` int(16) unsigned default NULL,
185   `companion2` int(16) unsigned default NULL,
186   `date` date default NULL,
187   `notes` text,
188   `visited` enum('y','n','') default NULL,
189   `visit_type` enum('presidency','hometeaching') not null default 'hometeaching',
190   PRIMARY KEY  (`visit`)
191 ) ENGINE=MyISAM AUTO_INCREMENT=9513 DEFAULT CHARSET=latin1;
192
193 --
194 -- Table structure for table `tc_willingness`
195 --
196 CREATE TABLE `tc_willingness` (
197   `individual` int(16) unsigned NOT NULL,
198   `assignment` int(16) unsigned NOT NULL,
199   `willing` enum('y','n','') NOT NULL,
200   KEY `individual` (`individual`,`assignment`)
201 ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
202
203 --
204 -- Table structure for table `tc_scheduling_priority`
205 --
206 CREATE TABLE `phpgroupware`.`tc_scheduling_priority` (
207 `scheduling_priority` INT( 16 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
208 `priority` INT( 10 ) UNSIGNED NOT NULL DEFAULT '30',
209 `notes` VARCHAR( 128 ) NOT NULL DEFAULT ''
210 ) ENGINE = MYISAM ;
211
212 --
213 -- Table structure for table `tc_email_list`
214 --
215 CREATE TABLE `phpgroupware`.`tc_email_list` (
216 `email_list` INT( 16 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
217 `name` VARCHAR( 128 ) NULL DEFAULT NULL
218 ) ENGINE = MYISAM ;
219
220 --
221 -- Table structure for table `tc_email_list_membership`
222 --
223 CREATE TABLE `phpgroupware`.`tc_email_list_membership` (
224 `individual` INT( 16 ) UNSIGNED NULL DEFAULT NULL ,
225 `email_list` INT( 16 ) UNSIGNED NULL DEFAULT NULL
226 ) ENGINE = MYISAM ;