File: mysql-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 (214 lines) | stat: -rwxr-xr-x 12,001 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
alter table comment rename as comments;
alter table comments change comment comments text;
alter table active_sessions change uid usid char(25);
alter table files change size f_size bigint(20);
ALTER TABLE prefs ADD remember_me int(4);
UPDATE prefs set remember_me = '0';
ALTER TABLE prefs ADD cookie_timeout int(4);
UPDATE prefs set cookie_timeout = '30';
alter table users add column homedir int(4);
UPDATE users set homedir = '1';
alter table users add column firstdir int(4);
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 char(80);
update prefs set wordtotext_path = '/usr/local/bin/antiword';
ALTER TABLE `wordidx` CHANGE `word` `word` CHAR( 128 ) BINARY NOT NULL;
alter table prefs add column peer_review int(4);
alter table prefs add column peer_opt int(4);
ALTER TABLE prefs add column self_create_homedir  int(4);
ALTER TABLE prefs add column self_captcha  int(4);
ALTER TABLE prefs add column info_panel_wide  int(4);
ALTER TABLE prefs add column track_favorites  int(4);



--
-- Table structure for table 'docfieldslabel'
--
                                                                                                                                                                                       
CREATE TABLE docfieldslabel (
  doc_field_id int(4) NOT NULL default '0',
  field_label char(80) NOT NULL default '',
  locale char(80) NOT NULL default ''
) TYPE=MyISAM;
                                                                                                                                                                                       

                                                                                                                                                                     
CREATE TABLE doctype (
        doc_type_id int(4) not null auto_increment,
        doc_type_name char(255) not null,
        primary key (doc_type_id)
);
                                                                                                                                                                     
INSERT INTO doctype (doc_type_name) values ("Default");
                                                                                                                                                                     
CREATE TABLE docfields (
        id int(4) not null auto_increment,
        doc_type_id int(4) not null ,
        field_name char(80) not null,
        field_position int(4) not null,
        field_type char(80) not null,
        field_values char(80) not null,
        field_size bigint not null,
        searchable int(4) not null,
        required int(4) not null,
        primary key (id)
);
                                                                                                                                                                     
                                                                                                                                                                     
                                                                                                                                                                     
CREATE TABLE docfieldvalues (
        id int(4) not null auto_increment,
        file_id int(4) not null ,
        field_name char(80) not null,
        field_value char(80) not null,
        primary key (id)
);
                                                                                                                                                                     
alter table files add column doctype int(4);
alter table files add column approved int(4);


alter table active_sessions add column currentdb int(4);

alter table prefs add column self_reg_firstdir int(4);
alter table prefs add column self_reg_homedir int(4);

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 int(4);
alter table prefs add column pref_bar int(4);
alter table prefs add column bulk_buttons int(4);
alter table prefs add column action_buttons int(4);
alter table prefs add column folder_tools int(4);

alter table prefs add column expand_disp_status int(4);
alter table prefs add column expand_disp_doc_num int(4);
alter table prefs add column expand_disp_doc_type int(4);
alter table prefs add column expand_disp_title int(4);
alter table prefs add column expand_disp_version int(4);
alter table prefs add column expand_disp_file int(4);
alter table prefs add column expand_disp_size int(4);
alter table prefs add column expand_disp_posted int(4);
alter table prefs add column expand_disp_updated int(4);
alter table prefs add column expand_disp_modified int(4);
alter table prefs add column expand_disp_action int(4);
alter table prefs add column expand_disp_held int(4);

alter table prefs add column collapse_disp_status int(4);
alter table prefs add column collapse_disp_doc_num int(4);
alter table prefs add column collapse_disp_doc_type int(4);
alter table prefs add column collapse_disp_title int(4);
alter table prefs add column collapse_disp_version int(4);
alter table prefs add column collapse_disp_file int(4);
alter table prefs add column collapse_disp_size int(4);
alter table prefs add column collapse_disp_posted int(4);
alter table prefs add column collapse_disp_updated int(4);
alter table prefs add column collapse_disp_modified int(4);
alter table prefs add column collapse_disp_action int(4);
alter table prefs add column collapse_disp_held int(4);

alter table prefs add column expand_search_disp_score int(4);
alter table prefs add column expand_search_disp_folder_path int(4);
alter table prefs add column expand_search_disp_doc_type int(4);
alter table prefs add column expand_search_disp_file int(4);
alter table prefs add column expand_search_disp_size int(4);
alter table prefs add column expand_search_disp_posted int(4);
alter table prefs add column expand_search_disp_updated int(4);
alter table prefs add column expand_search_disp_modified int(4);
alter table prefs add column expand_search_disp_action int(4);

alter table prefs add column collapse_search_disp_score int(4);
alter table prefs add column collapse_search_disp_folder_path int(4);
alter table prefs add column collapse_search_disp_doc_type int(4);
alter table prefs add column collapse_search_disp_file int(4);
alter table prefs add column collapse_search_disp_size int(4);
alter table prefs add column collapse_search_disp_posted int(4);
alter table prefs add column collapse_search_disp_updated int(4);
alter table prefs add column collapse_search_disp_modified int(4);
alter table prefs add column collapse_search_disp_action int(4);

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



alter table users add column email_tool int(4);
update users set email_tool = '0';


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

alter TABLE files add column linkedto int(4);
alter table files change name name char(255);
alter table files add column password varchar(50);
alter table files add column updatorid int(4);


CREATE TABLE metakeywords (
        keyword_id int(4) not null auto_increment,
        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');

CREATE TABLE peerreview (
        reviewer_id int(4) not null ,
        file_id int(4) not null,
        status int(4) not null
);

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', self_captcha = '0';

alter table prefs add column folder_size int(4);
update prefs set folder_size = '1';
                                                                                                                                                             
alter table prefs add column download_folder_zip int(4);
update prefs set download_folder_zip = '0';

alter table prefs add column display_password_override int(4);
update prefs set display_password_override = '1';
ALTER TABLE `prefs` ADD COLUMN `allow_custpopup` INT(4) AFTER `allow_popup`;
ALTER TABLE `docfields` ADD COLUMN `show_desc` INT(4) NOT NULL DEFAULT 0 AFTER `searchable`;
ALTER TABLE prefs add column expand_disp_updated int(4) default NULL;
ALTER TABLE prefs add column collapse_disp_updated int(4) default NULL;
ALTER TABLE prefs add column expand_search_disp_updated int(4) default NULL;
ALTER TABLE prefs add column collapse_search_disp_updated int(4) default NULL;
ALTER TABLE prefs add column thumb_disp_updated  int(4);