File: pg-up-from-0.72.sql

package info (click to toggle)
owl-dms 0.90-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 17,292 kB
  • ctags: 10,919
  • sloc: php: 48,457; sql: 3,603; sh: 363; perl: 204; makefile: 73
file content (215 lines) | stat: -rwxr-xr-x 11,516 bytes parent folder | download
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
ALTER TABLE comment RENAME COLUMN comment TO comments;
ALTER TABLE comment RENAME TO comments;
ALTER TABLE active_sessions RENAME COLUMN uid to usid;
ALTER TABLE files RENAME COLUMN size to f_size;
ALTER TABLE prefs ADD remember_me int4;
UPDATE prefs set remember_me = '0';
ALTER TABLE prefs ADD cookie_timeout int4;
UPDATE prefs set cookie_timeout = '30';
ALTER TABLE users ADD homedir int4;
UPDATE users set homedir = '1';
ALTER TABLE users ADD firstdir int4;
UPDATE users set firstdir = '1';
ALTER TABLE `users` CHANGE `quota_max` `quota_max` BIGINT;
ALTER TABLE `users` CHANGE `quota_current` `quota_current` BIGINT;
create INDEX parentid_index ON files (parent);
ALTER TABLE prefs ADD wordtotext_path varchar(80);
update prefs set wordtotext_path = '/usr/local/bin/antiword';
alter table prefs add column peer_review int4;
alter table prefs add column peer_opt int4;


                                                                                                                                                                     
CREATE TABLE docfieldslabel (
  doc_field_id int4 NOT NULL default '0',
  field_label varchar(80) NOT NULL default '',
  locale varchar(80) NOT NULL default ''
);

CREATE TABLE doctype (
        doc_type_id serial,
        doc_type_name varchar(255) not null,
        primary key (doc_type_id)
);
                                                                                                                                                                     
INSERT INTO doctype (doc_type_name) values ('Default');
                                                                                                                                                                     
CREATE TABLE docfields (
        id serial,
        doc_type_id int4 not null ,
        field_name varchar(80) not null,
        field_position int4 not null,
        field_type varchar(80) not null,
        field_values varchar(80) not null,
        field_size int4 not null,
        searchable int4 not null,
        required int4 not null,
        primary key (id)
);
                                                                                                                                                                     
                                                                                                                                                                     
                                                                                                                                                                     
CREATE TABLE docfieldvalues (
        id serial,
        file_id int4 not null ,
        field_name varchar(80) not null,
        field_value varchar(80) not null,
        primary key (id)
);
                                                                                                                                                                     
alter table files add column doctype int4;
alter table files add column approved int4;

alter table active_sessions add column currentdb int4;

alter table prefs add column self_reg_firstdir int4;
alter table prefs add column self_reg_homedir int4;

alter table prefs add column virus_path varchar(80);

alter table prefs add column smtp_auth_login varchar(50);

alter table prefs add column search_bar int4;
alter table prefs add column pref_bar int4;
alter table prefs add column bulk_buttons int4;
alter table prefs add column action_buttons int4;
alter table prefs add column folder_tools int4;

alter table prefs add column expand_disp_status int4;
alter table prefs add column expand_disp_doc_num int4;
alter table prefs add column expand_disp_doc_type int4;
alter table prefs add column expand_disp_title int4;
alter table prefs add column expand_disp_version int4;
alter table prefs add column expand_disp_file int4;
alter table prefs add column expand_disp_size int4;
alter table prefs add column expand_disp_posted int4;
alter table prefs add column expand_disp_updated int4;
alter table prefs add column expand_disp_modified int4;
alter table prefs add column expand_disp_action int4;
alter table prefs add column expand_disp_held int4;

alter table prefs add column collapse_disp_status int4;
alter table prefs add column collapse_disp_doc_num int4;
alter table prefs add column collapse_disp_doc_type int4;
alter table prefs add column collapse_disp_title int4;
alter table prefs add column collapse_disp_version int4;
alter table prefs add column collapse_disp_file int4;
alter table prefs add column collapse_disp_size int4;
alter table prefs add column collapse_disp_posted int4;
alter table prefs add column collapse_disp_updated int4;
alter table prefs add column collapse_disp_modified int4;
alter table prefs add column collapse_disp_action int4;
alter table prefs add column collapse_disp_held int4;

alter table prefs add column expand_search_disp_score int4;
alter table prefs add column expand_search_disp_folder_path int4;
alter table prefs add column expand_search_disp_doc_type int4;
alter table prefs add column expand_search_disp_file int4;
alter table prefs add column expand_search_disp_size int4;
alter table prefs add column expand_search_disp_posted int4;
alter table prefs add column expand_search_disp_updated int4;
alter table prefs add column expand_search_disp_modified int4;
alter table prefs add column expand_search_disp_action int4;

alter table prefs add column collapse_search_disp_score int4;
alter table prefs add column collapse_search_disp_folder_path int4;
alter table prefs add column collapse_search_disp_doc_type int4;
alter table prefs add column collapse_search_disp_file int4;
alter table prefs add column collapse_search_disp_size int4;
alter table prefs add column collapse_search_disp_posted int4;
alter table prefs add column collapse_search_disp_updated int4;
alter table prefs add column collapse_search_disp_modified int4;
alter table prefs add column collapse_search_disp_action int4;

alter table prefs add column hide_folder_doc_count int4;
alter table prefs add column old_action_icons int4;
alter table prefs add column search_result_folders int4;
alter table prefs add column restore_file_prefix varchar(50);
alter table prefs add column major_revision int4;
alter table prefs add column minor_revision int4;
alter table prefs add column doc_id_prefix varchar(10);
alter table prefs add column doc_id_num_digits int4;
alter table prefs add column view_doc_in_new_window int4;
alter table prefs add column admin_login_to_browse_page int4;
alter table prefs add column save_keywords_to_db int4;
alter table prefs drop column hide_bulk;



alter table users add column email_tool int4;
update users set email_tool = '0';


alter table folders add column password varchar(50);
alter table folders add column smodified timestamp;
update folders set smodified = now();

alter table files add column linkedto int4;
alter table files rename column name to name char(255);
alter table files add column password varchar(50);
alter table files add column updatorid int4;


CREATE TABLE metakeywords (
        keyword_id serial,
        keyword_text char(255) not null,
        primary key (keyword_id)
);


INSERT INTO mimes VALUES ('sxw', 'application/vnd.sun.xml.writer');
INSERT INTO mimes VALUES ('stw', 'application/vnd.sun.xml.writer.template');
INSERT INTO mimes VALUES ('sxg', 'application/vnd.sun.xml.writer.global');
INSERT INTO mimes VALUES ('sxc', 'application/vnd.sun.xml.calc');
INSERT INTO mimes VALUES ('stc', 'application/vnd.sun.xml.calc.template');
INSERT INTO mimes VALUES ('sxi', 'application/vnd.sun.xml.impress');
INSERT INTO mimes VALUES ('sti', 'application/vnd.sun.xml.impress.template');
INSERT INTO mimes VALUES ('sxd', 'application/vnd.sun.xml.draw');
INSERT INTO mimes VALUES ('std', 'application/vnd.sun.xml.draw.template');
INSERT INTO mimes VALUES ('sxm', 'application/vnd.sun.xml.math');

ALTER TABLE `owl_log` CHANGE `agent` `agent` varchar(255);

CREATE TABLE peerreview (
        reviewer_id int4,
        file_id int4,
        status int4
);

UPDATE files set approved = '1';
alter table html drop column table_border;
alter table html drop column table_header_bg;
alter table html drop column table_cell_bg;
alter table html drop column table_cell_bg_alt;
alter table html drop column main_header_bgcolor;
alter table html drop column body_bgcolor;

UPDATE prefs SET self_reg_homedir='1', self_reg_firstdir='1',  virus_path = '', smtp_auth_login = '', search_bar = '2', pref_bar = '1', bulk_buttons = '1', action_buttons = '1', folder_tools = '1', expand_disp_status = '1', expand_disp_doc_num = '0', expand_disp_doc_type = '1', expand_disp_title = '1', expand_disp_version = '1', expand_disp_file = '1', expand_disp_size = '1', expand_disp_posted = '1', expand_disp_modified = '1', expand_disp_action = '1', expand_disp_held = '1', collapse_disp_status = '0', collapse_disp_doc_num = '0', collapse_disp_doc_type = '1', collapse_disp_title = '1', collapse_disp_version = '0', collapse_disp_file = '1', collapse_disp_size = '0', collapse_disp_posted = '0', collapse_disp_modified = '0', collapse_disp_action = '1', collapse_disp_held = '1', expand_search_disp_score = '1', expand_search_disp_folder_path = '1', expand_search_disp_doc_type = '1', expand_search_disp_file = '1', expand_search_disp_size = '1', expand_search_disp_posted = '1', expand_search_disp_modified = '1', expand_search_disp_action = '1', collapse_search_disp_score = '1', collapse_search_disp_folder_path = '1', collapse_search_disp_doc_type = '1', collapse_search_disp_file = '1', collapse_search_disp_size = '0', collapse_search_disp_posted = '0', collapse_search_disp_modified = '0', collapse_search_disp_action = '0', hide_folder_doc_count = '0', old_action_icons = '1', search_result_folders = '1', restore_file_prefix = 'RESTORED-', major_revision = '1', minor_revision = '0', doc_id_prefix = 'ABC-', doc_id_num_digits = '3', view_doc_in_new_window = '0', admin_login_to_browse_page = '0', save_keywords_to_db = '0',  peer_review = '0', peer_opt = '0';

alter table prefs add column folder_size int4;
update prefs set folder_size = '1';

alter table prefs add column download_folder_zip int4;
update prefs set download_folder_zip = '0';

alter table prefs add column display_password_override int4;
update prefs set display_password_override = '1';
ALTER TABLE `prefs` ADD COLUMN `allow_custpopup` int4;
ALTER TABLE `docfields` ADD COLUMN `show_desc` int4 NOT NULL DEFAULT;
ALTER TABLE prefs add column self_create_homedir  int4;
ALTER TABLE prefs add column self_captcha  int4;
ALTER TABLE prefs add column info_panel_wide  int4;
ALTER TABLE prefs add column track_favorites  int4;
ALTER TABLE prefs add column thumb_disp_status int4;
ALTER TABLE prefs add column thumb_disp_doc_num  int4;
ALTER TABLE prefs add column thumb_disp_image_info  int4;
ALTER TABLE prefs add column thumb_disp_version  int4;
ALTER TABLE prefs add column thumb_disp_size  int4;
ALTER TABLE prefs add column thumb_disp_posted  int4;
ALTER TABLE prefs add column thumb_disp_updated  int4;
ALTER TABLE prefs add column thumb_disp_modified  int4;
ALTER TABLE prefs add column thumb_disp_action  int4;
ALTER TABLE prefs add column thumb_disp_held  int4;

UPDATE prefs SET thumb_disp_status='1', thumb_disp_doc_num ='1', thumb_disp_image_info ='1', thumb_disp_version ='1', thumb_disp_size ='1', thumb_disp_posted ='1', thumb_disp_modified ='1', thumb_disp_action ='1', thumb_disp_held ='1', thumb_disp_updated = '0';