summaryrefslogtreecommitdiff
blob: d9dc0f11377021620b5899680449f027aee0855b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
CREATE SEQUENCE "serial_id" start 9 increment 1 maxvalue 2147483647 minvalue 1 cache 1 cycle;
CREATE TABLE projects (
	"intfield01" integer,
	"fuid" integer,
	"creation_date" timestamp with time zone,
	"created_from" text,
	"changing_date" timestamp with time zone,
	"changed_from" text,
	"user_right" text,
	"sid" text,
	"tid" text,
	"project_startdate" timestamp with time zone,
	"project_enddate" timestamp with time zone,
	"project_deadline" timestamp with time zone,
	"project_reminder" timestamp with time zone,
	"project_budget" text,
	"project_effort" text,
	"project_effort_unit" text,
	"project_currency" text,
	"project_type" text,
	"project_kickoff" timestamp with time zone,
	"project_description" text,
	"project_goal" text,
	"project_customer" text,
	"project_name" text,
	"project_status" text,
	"project_phase" text,
	"project_number_of_attachments" integer,
	"project_task_folder_id" integer,
	"project_manage_permissions" integer,
	primary key (intfield01)
);

CREATE TABLE backup_projects (
	"intfield01" integer,
	"fuid" integer,
	"creation_date" timestamp with time zone,
	"created_from" text,
	"changing_date" timestamp with time zone,
	"changed_from" text,
	"user_right" text,
	"sid" text,
	"tid" text,
	"project_startdate" timestamp with time zone,
	"project_enddate" timestamp with time zone,
	"project_deadline" timestamp with time zone,
	"project_reminder" timestamp with time zone,
	"project_budget" text,
	"project_effort" text,
	"project_effort_unit" text,
	"project_currency" text,
	"project_type" text,
	"project_kickoff" timestamp with time zone,
	"project_description" text,
	"project_goal" text,
	"project_customer" text,
	"project_name" text,
	"project_status" text,
	"project_phase" text,
	"project_number_of_attachments" integer,
	"project_task_folder_id" integer,
	"project_manage_permissions" integer,
	primary key (intfield01)
);

CREATE TABLE projects_participants (
	"intfield01" integer,
	"id" text,
	"name" text,
	"role" integer,
	"ptype" integer,
	"group_id" text,
	"merged_permission" integer,
	primary key (intfield01, id, group_id),
	foreign key (intfield01) references projects on delete cascade on update cascade
);

CREATE TABLE backup_projects_participants (
	"intfield01" integer,
	"id" text,
	"name" text,
	"role" integer,
	"ptype" integer,
	"group_id" text,
	"merged_permission" integer,
	primary key (intfield01, id, group_id),
	foreign key (intfield01) references backup_projects on delete cascade on update cascade
);

CREATE TABLE projects_milestones (
	"intfield01" integer,
	"id" integer,
	"name" text,
	"description" text,
	"mdate" timestamp with time zone,
	primary key (intfield01, id),
	foreign key (intfield01) references projects on delete cascade on update cascade
);

CREATE TABLE backup_projects_milestones (
	"intfield01" integer,
	"id" integer,
	"name" text,
	"description" text,
	"mdate" timestamp with time zone,
	primary key (intfield01, id),
	foreign key (intfield01) references backup_projects on delete cascade on update cascade
);

CREATE TABLE projects_notes (
	"intfield01" integer,
	"note_id" text,
	"member_id" text,
	primary key (intfield01, note_id),
	foreign key (intfield01) references projects on delete cascade on update cascade
);

CREATE TABLE backup_projects_notes (
	"intfield01" integer,
	"note_id" text,
	"member_id" text,
	primary key (intfield01, note_id),
	foreign key (intfield01) references backup_projects on delete cascade on update cascade
);

CREATE TABLE projects_tasks (
	"intfield01" integer,
	"task_id" integer,
	primary key (intfield01, task_id),
	foreign key (intfield01) references projects on delete cascade on update cascade
);

CREATE TABLE backup_projects_tasks (
	"intfield01" integer,
	"task_id" integer,
	primary key (intfield01, task_id),
	foreign key (intfield01) references backup_projects on delete cascade on update cascade
);

CREATE TABLE projects_dependencies (
	"intfield01" integer,
	"id" integer,
	"successor" text,
	"dependency_type" integer,
	"object_type" integer,
	primary key (intfield01, id),
	foreign key (intfield01) references projects on delete cascade on update cascade
);

CREATE TABLE backup_projects_dependencies (
	"intfield01" integer,
	"id" integer,
	"successor" text,
	"dependency_type" integer,
	"object_type" integer,
	primary key (intfield01, id),
	foreign key (intfield01) references backup_projects on delete cascade on update cascade
);

CREATE TABLE projects_antecessors (
	"intfield01" integer,
	"id" integer,
	"antecessor" text,
	"object_type" integer,
	primary key (intfield01, id, antecessor),
	foreign key (intfield01, id) references projects_dependencies on delete cascade on update cascade
);

CREATE TABLE backup_projects_antecessors (
	"intfield01" integer,
	"id" integer,
	"antecessor" text,
	"object_type" integer,
	primary key (intfield01, id, antecessor),
	foreign key (intfield01, id) references backup_projects_dependencies on delete cascade on update cascade
);

CREATE TABLE projects_puids (
	"intfield01" integer,
	"puid" integer,
	"entity" text,
	"fuid" integer,
	primary key (intfield01, puid),
	foreign key (intfield01) references projects on delete cascade on update cascade
);

CREATE TABLE backup_projects_puids (
	"intfield01" integer,
	"puid" integer,
	"entity" text,
	"fuid" integer,
	primary key (intfield01, puid),
	foreign key (intfield01) references backup_projects on delete cascade on update cascade
);

CREATE table "oxfolder_userfolders" (
		"module_name" text,
		"linksite" text,
		"target" text,
		"img" text
);


CREATE TABLE "ical_principal" (
		"object_id" int,
		"principal" text,
		"calendarfolder" int,
		"taskfolder" int
);

CREATE TABLE "ical_ids" (
		"object_id" int,
		"principal_id" int,
		"client_id" text,
		"target_object_id" int,
		"module" int
);

CREATE TABLE "vcard_principal" (
		"object_id" int,
		"principal" text,
		"contactfolder" int
);

CREATE TABLE "vcard_ids" (
		"object_id" int,
		"principal_id" int,
		"client_id" text,
		"target_object_id" int
);

INSERT INTO oxfolder_tree VALUES (7, 0, 'user', 'system', 'system','system', 'system', 'now', 'System', null, null);
INSERT INTO oxfolder_tree VALUES (8, 7, 'projects', 'projects', 'system','system', 'system', 'now', 'System', null, null);
INSERT INTO oxfolder_permissions VALUES ((select nextval('serial_id')), 7, 512, 'all_ox_users_and_ox_groups', 0, 2, 0, 0, 0);
INSERT INTO oxfolder_permissions VALUES ((select nextval('serial_id')), 8, 512, 'all_ox_users_and_ox_groups', 0, 8, 4, 2, 2);
INSERT INTO oxfolder_specialfolders VALUES ('user', 7);

INSERT INTO oxfolder_userfolders VALUES ('projects', 'projects/projects_list_all', null, 'folder/item_projects.png');