added new tc_companion table, updated tc_companionship table, linked tc_calling table...
[eq/.git] / sql / schema.dot
1 digraph schema {
2   graph [
3     rankdir = "LR"
4   ];
5   activity   [
6     label = "activity||<a> activity|<s> assignment|<t> date|<n> notes"
7     shape = "record"
8   ];
9   appointment   [
10     label = "appointment||<a> appointment|<p> presidency|<f> family|<i> individual |<d> date|<t> time|<l> location|<u> uid"
11     shape = "record"
12   ];
13   assignment    [
14     label = "assignment||<a> assignment|<n> name|<ab> abbreviation"
15     shape = "record"
16   ];
17   attendance   [
18     label = "attendance||<i> individual|<d> date"
19     shape = "record"
20   ];
21   calling       [
22     label = "calling||<i> individual|<o> organization|<p> position|<s> sustained"
23     shape = "record"
24   ];
25   companion   [
26     label = "companion||<c> companion|<i> individual|<cp> companionship|<sp> scheduling_priority|<v> valid"
27     shape = "record"
28   ];
29   companionship   [
30     label = "companionship||<c> companionship|<d> district|<v> valid"
31     shape = "record"
32   ];
33   district      [
34     label = "district||<d> district|<s> supervisor|<v> valid"
35     shape = "record"
36   ];
37   individual   [
38     label = "individual||<i> individual|<id> mls_id|<n> name|<fn> fullname|<a> address|<p> phone|<em> email|<hh> hh position|<pr> priesthood|<st> steward|<sp> scheduling_priority|<a> attending|<v> valid"
39     shape = "record"
40   ];
41   family   [
42     label = "family||<f> family|<i> individual|<c> companionship|<sp> scheduling_priority|<v> valid"
43     shape = "record"
44   ];
45   participation   [
46     label = "participation||<i> individual|<a> activity"
47     shape = "record"
48   ];
49   interview   [
50     label = "interview||<in> interview|<i> interviewer|<il> individual|<t> date|<n> notes|<it> interview_type"
51     shape = "record"
52   ];
53   presidency    [
54     label = "presidency||<p> presidency|<i> individual|<d> district|<em> email|<pr> president|<cn> counselor|<sec> secreatary|<v> valid"
55     shape = "record"
56   ];
57   visit   [
58     label = "visit||<v> visit|<f> family|<c> companionship|<c1> companion1|<c2> companion2|<t> date|<n> notes|<v> visited|<vt> visit_type"
59     shape = "record"
60   ];
61   willingness   [
62     label = "willingness||<i> individual|<a> assignment|<w> willing"
63     shape = "record"
64   ];
65   scheduling_priority   [
66     label = "scheduling_priority||<sp> scheduling_priority|<p> priority|<n> notes"
67     shape = "record"
68   ];
69   email_list   [
70     label = "email_list||<e> email_list|<n> name"
71     shape = "record"
72   ];
73   email_list_membership   [
74     label = "email_list_membership||<i> individual|<e> email_list"
75     shape = "record"
76   ];
77   accomplishment   [
78     label = "accomplishment||<a> accomplishment|<i> individual|<d> date|<t> task|<n> note"
79     shape = "record"
80   ];
81   task   [
82     label = "task||<t> task|<n> name|<d> description"
83     shape = "record"
84   ];
85
86   activity:s      -> assignment:a
87
88   appointment:p   -> presidency:p
89   appointment:f   -> family:f
90   appointment:i   -> individual:i
91
92   attendance:i    -> individual:i
93   
94   calling:i       -> individual:i
95
96   companion:cp    -> companionship:c
97   companion:i     -> individual:i
98   companion:sp    -> scheduling_priority:sp
99
100   companionship:d -> district:d
101   
102   district:s      -> individual:i
103   
104   individual:sp   -> scheduling_priority:sp
105   
106   family:i        -> individual:i
107   family:c        -> companionship:c
108   family:sp       -> scheduling_priority:sp
109
110   participation:i -> individual:i
111   participation:a -> activity:a
112
113   interview:il    -> individual:i
114   interview:i     -> individual:i
115
116   presidency:i    -> individual:i
117   presidency:d    -> district:d
118
119   visit:c         -> companionship:c
120   visit:f         -> family:f
121   visit:c1        -> presidency:i
122   visit:c2        -> presidency:i
123
124   willingness:i   -> individual:i
125   willingness:a   -> assignment:a
126
127   email_list_membership:i  -> individual:i
128   email_list_membership:e  -> email_list:e
129   
130   accomplishment:i   -> individual:i
131   accomplishment:t   -> task:t
132   
133 }