1 <?xml version="1.0" encoding="utf-8"?>
3 PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4 "DTD/xhtml1-transitional.dtd">
5 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7 <title>WebCalendar Upgrading Notes</title>
8 <style type="text/css">
10 font-family: arial, verdana;
11 background-color: #FFFFFF;
14 text-decoration: none;
20 background-color: #606080;
24 background-color: #C0C0C0;
27 background-color: #6060C0;
33 font-family: courier, monospace;
34 border: 1px solid blue;
35 background-color: #EEEEFF;
43 <h2>WebCalendar Upgrading Notes</h2>
45 <p>Below are the steps needed to upgrade from a previous version.
46 Select your current version from the list below. If you are more
47 than one version behind (i.e. the current version is v0.9.45,
48 and you're using 0.9.39), click the "next.." link at the end of
49 each section to move to the next version. Always follow the versions
56 <a href="UPGRADING.html#1dot0RC1">0.9.45 or 1.0RC1</a></li><li>
57 <a href="UPGRADING.html#dot945">0.9.44</a></li><li>
58 <a href="UPGRADING.html#dot944">0.9.43</a></li><li>
59 <a href="UPGRADING.html#dot943">0.9.42</a></li><li>
60 <a href="UPGRADING.html#dot942">0.9.41</a></li><li>
61 <a href="UPGRADING.html#dot941">0.9.40</a></li><li>
62 <a href="UPGRADING.html#dot940">0.9.39</a></li><li>
63 <a href="UPGRADING.html#dot939">0.9.38</a></li><li>
64 <a href="UPGRADING.html#dot938">0.9.37</a></li><li>
65 <a href="UPGRADING.html#dot937">0.9.36 or 0.9.35</a></li><li>
66 <a href="UPGRADING.html#dot935">0.9.34 - 0.9.27</a></li><li>
67 <a href="UPGRADING.html#dot927">0.9.26 - 0.9.22</a></li><li>
68 <a href="UPGRADING.html#dot922">0.9.21 - 0.9.14</a></li><li>
69 <a href="UPGRADING.html#dot914">0.9.13 or 0.9.12</a></li><li>
70 <a href="UPGRADING.html#dot912">0.9.11 - 0.9.07</a></li><li>
71 <a href="UPGRADING.html#dot907">0.9.06 - 0.9.01</a></li><li>
72 <a href="UPGRADING.html#dot901">0.9</a>
77 <h4><a id="dot901">To upgrade from v0.9 to v0.9.01:</a></h4>
78 <p>You need to create the table cal_user_pref in tables.sql.
79 You need to create the table cal_entry_user in tables.sql that
80 was mistakenly created as "cal_event_user" in the 0.9 release.</p>
81 <a href="UPGRADING.html#dot907">next..</a>
84 <h4><a id="dot907">To upgrade from v0.9.01 to v0.9.07:</a></h4>
85 <p>Entirely new tables are used. Use the following commands to
86 convert your existing MySQL tables to the new tables:</p>
90 mysql intranet < commands.sql
92 <p>where "intranet" is the name of the MySQL database that contains
93 your WebCalendar tables.</p>
94 <a href="UPGRADING.html#dot912">next..</a>
97 <h4><a id="dot912">To upgrade from v0.9.07 - v0.9.11 to v0.9.12:</a></h4>
98 <p>To fix a bug in the handing of events at midnight, all the
99 entries with NULL for cal_time are changed to -1. Use the
100 following SQL command:</p>
101 <pre>update webcal_entry set cal_time = -1 where cal_time is null;</pre>
102 <a href="UPGRADING.html#dot914">next..</a>
105 <h4><a id="dot914">To upgrade from v0.9.12 or v0.9.13 to v0.9.14:</a></h4>
106 <p>A new table was added to support repeating events. Look at
107 tables-mysql.sql, tables-oracle.sql, or tables-postgres.sql.
108 Execute the SQL for creating the webcal_entry_repeats. For MySQL,
111 CREATE TABLE webcal_entry_repeats (
112 cal_id INT DEFAULT '0' NOT NULL,
113 cal_type VARCHAR(20),
115 cal_frequency INT DEFAULT '1',
120 <a href="UPGRADING.html#dot922">next..</a>
123 <h4><a id="dot922">To upgrade from v0.9.14 - v0.9.21 to v0.9.22:</a></h4>
124 <p>A new table was added to support layering. Look at
125 tables-mysql.sql, tables-oracle.sql, or tables-postgres.sql.
126 Execute the SQL for creating the webcal_entry_repeats. For MySQL,
129 CREATE TABLE webcal_user_layers (
130 cal_layerid INT DEFAULT '0' NOT NULL,
131 cal_login varchar(25) NOT NULL,
132 cal_layeruser varchar(25) NOT NULL,
133 cal_color varchar(25) NULL,
134 cal_dups CHAR(1) DEFAULT 'N',
135 PRIMARY KEY ( cal_login, cal_layeruser )
138 <a href="UPGRADING.html#dot927">next..</a>
141 <h4><a id="dot927">To upgrade from v0.9.22 - v0.9.26 to v0.9.27:</a></h4>
142 <p>Two new tables were added for custom event fields and reminders.
143 Look at tables-mysql.sql, tables-oracle.sql, or tables-postgres.sql.
144 Execute the SQL for creating webcal_site_extras and webcal_reminder_log.
145 For MySQL and PostgreSQL, the SQL is:</p>
147 CREATE TABLE webcal_site_extras (
148 cal_id INT DEFAULT '0' NOT NULL,
149 cal_name VARCHAR(25) NOT NULL,
150 cal_type INT NOT NULL,
151 cal_date INT DEFAULT '0',
152 cal_remind INT DEFAULT '0',
154 PRIMARY KEY ( cal_id, cal_name, cal_type )
156 CREATE TABLE webcal_reminder_log (
157 cal_id INT DEFAULT '0' NOT NULL,
158 cal_name VARCHAR(25) NOT NULL,
159 cal_event_date INT NOT NULL DEFAULT 0,
160 cal_last_sent INT NOT NULL DEFAULT 0,
161 PRIMARY KEY ( cal_id, cal_name, cal_event_date )
164 <p>For Oracle, the SQL is:</p>
166 CREATE TABLE webcal_site_extras (
167 cal_id INT DEFAULT '0' NOT NULL,
168 cal_name VARCHAR(25) NOT NULL,
169 cal_type INT NOT NULL,
170 cal_date INT DEFAULT '0',
171 cal_remind INT DEFAULT '0',
173 PRIMARY KEY ( cal_id, cal_name, cal_type )
175 CREATE TABLE webcal_reminder_log (
176 cal_id INT DEFAULT '0' NOT NULL,
177 cal_name VARCHAR(25) NOT NULL,
178 cal_event_date INT NOT NULL DEFAULT 0,
179 cal_last_sent INT NOT NULL DEFAULT 0,
180 PRIMARY KEY ( cal_id, cal_name, cal_event_date )
183 <p>You will also need to setup the tools/send_reminders.php script
184 to be run periodically. I would recommend once an hour. For
185 Linux/UNIX, this is simple. Just use cron and add a line to
186 your crontab file that looks like:</p>
187 <pre>1 * * * * cd /some/directory/webcalendar/tools; ./send_reminders.php</pre>
188 <p>This will tell cron to run the script at one minute after the hour.
189 Windows users will have to find another way to run the script.
190 There are ports/look-a-likes of cron for Windows, so look around.</p>
191 <a href="UPGRADING.html#dot935">next..</a>
194 <h4><a id="dot935">To upgrade from v0.9.27 - v0.9.34 to v0.9.35:</a></h4>
195 <p>Six new tables were added for group support, views, system
196 settings and activity logs. Look at tables-mysql.sql,
197 tables-oracle.sql, or tables-postgres.sql for these
198 new tables: webcal_group, webcal_group_user,
199 webcal_view, webcal_view_user, wecbal_config, webcal_entry_log.
200 After adding these tables, be sure to go to the System Settings page
201 (admin.php) since you will be missing some config stuff in your
202 database that you can add from the System Settings page.
203 For MySQL and PostgreSQL, the SQL is:</p>
205 CREATE TABLE webcal_group (
206 cal_group_id INT NOT NULL,
207 cal_owner VARCHAR(25) NULL,
208 cal_name VARCHAR(50) NOT NULL,
209 cal_last_update INT NOT NULL,
210 PRIMARY KEY ( cal_group_id )
212 CREATE TABLE webcal_group_user (
213 cal_group_id INT NOT NULL,
214 cal_login VARCHAR(25) NOT NULL,
215 PRIMARY KEY ( cal_group_id, cal_login )
217 CREATE TABLE webcal_view (
218 cal_view_id INT NOT NULL,
219 cal_owner VARCHAR(25) NOT NULL,
220 cal_name VARCHAR(50) NOT NULL,
221 cal_view_type CHAR(1),
222 PRIMARY KEY ( cal_view_id )
224 CREATE TABLE webcal_view_user (
225 cal_view_id INT NOT NULL,
226 cal_login VARCHAR(25) NOT NULL,
227 PRIMARY KEY ( cal_view_id, cal_login )
229 CREATE TABLE webcal_config (
230 cal_setting VARCHAR(50) NOT NULL,
231 cal_value VARCHAR(50) NULL,
232 PRIMARY KEY ( cal_setting )
234 CREATE TABLE webcal_entry_log (
235 cal_log_id INT NOT NULL,
236 cal_entry_id INT NOT NULL,
237 cal_login VARCHAR(25) NOT NULL,
238 cal_type CHAR(1) NOT NULL,
239 cal_date INT NOT NULL,
242 PRIMARY KEY ( cal_log_id )
245 <a href="UPGRADING.html#dot937">next..</a>
248 <h4><a id="dot937">To upgrade from v0.9.35 or v0.9.36 to v0.9.37:</a></h4>
249 <p>The webcal_entry_log table was modified, and a new table
250 webcal_entry_repeats_not was created. Use the following SQL
251 to modify your table for MySQL and PostgreSQL:</p>
253 ALTER TABLE webcal_entry_log ADD cal_user_cal VARCHAR(25);
254 CREATE TABLE webcal_entry_repeats_not (
256 cal_date INT NOT NULL,
257 PRIMARY KEY ( cal_id, cal_date )
260 <a href="UPGRADING.html#dot938">next..</a>
263 <h4><a id="dot938">To upgrade from v0.9.37 to v0.9.38:</a></h4>
264 <p>The webcal_entry_user table was modified, and a new table
265 webcal_categories was created. Use the following SQL
266 to modify your table for MySQL and PostgreSQL:</p>
268 ALTER TABLE webcal_entry_user ADD cal_category INT DEFAULT NULL;
269 CREATE TABLE webcal_categories (
271 cat_owner VARCHAR(25),
272 cat_name VARCHAR(80) NOT NULL,
273 PRIMARY KEY ( cat_id )
276 <a href="UPGRADING.html#dot939">next..</a>
279 <h4><a id="dot939">To upgrade from v0.9.38 to v0.9.39:</a></h4>
280 <p>The names of the date settings in the database were modified.
281 All old data settings need to be removed from the database.</p>
283 DELETE FROM webcal_config WHERE cal_setting LIKE 'DATE_FORMAT%';
284 DELETE FROM webcal_user_pref WHERE cal_setting LIKE 'DATE_FORMAT%';
286 <a href="UPGRADING.html#dot940">next..</a>
289 <h4><a id="dot940">To upgrade from v0.9.39 to v0.9.40:</a></h4>
290 <p>Two new tables were created: webcal_asst and webcal_entry_ext_user.
291 And the column cal_ext_for_id was added to the webcal_entry table.
292 Use the following SQL for MySQL and PostgreSQL:</p>
294 CREATE TABLE webcal_asst (
295 cal_boss VARCHAR(25) NOT NULL,
296 cal_assistant VARCHAR(25) NOT NULL,
297 PRIMARY KEY ( cal_boss, cal_assistant )
299 CREATE TABLE webcal_entry_ext_user (
300 cal_id INT DEFAULT 0 NOT NULL,
301 cal_fullname VARCHAR(50) NOT NULL,
302 cal_email VARCHAR(75) NULL,
303 PRIMARY KEY ( cal_id, cal_fullname )
305 ALTER TABLE webcal_entry ADD cal_ext_for_id INT NULL;
307 <p>For Oracle, use VARCHAR2 instead of VARCHAR.</p>
308 <a href="UPGRADING.html#dot941">next..</a>
311 <h4><a id="dot941">To upgrade from v0.9.40 to v0.9.41:</a></h4>
312 <p>One new table was added: webcal_nonuser_cals.
313 Use the following SQL for MySQL and PostgreSQL:</p>
315 CREATE TABLE webcal_nonuser_cals (
316 cal_login VARCHAR(25) NOT NULL,
317 cal_lastname VARCHAR(25),
318 cal_firstname VARCHAR(25),
319 cal_admin VARCHAR(25) NOT NULL,
320 PRIMARY KEY ( cal_login )
323 <p>For Oracle, use VARCHAR2 instead of VARCHAR and LONG instead of TEXT.</p>
324 <a href="UPGRADING.html#dot942">next..</a>
327 <h4><a id="dot942">To upgrade from v0.9.41 to v0.9.42:</a></h4>
328 <p>Three new tables were added: webcal_report,
329 webcal_report_template, and webcal_import_data.
330 Use the following SQL for MySQL and PostgreSQL:</p>
332 CREATE TABLE webcal_report (
333 cal_login VARCHAR(25) NOT NULL,
334 cal_report_id INT NOT NULL,
335 cal_is_global CHAR(1) DEFAULT 'N' NOT NULL,
336 cal_report_type VARCHAR(20) NOT NULL,
337 cal_include_header CHAR(1) DEFAULT 'Y' NOT NULL,
338 cal_report_name VARCHAR(50) NOT NULL,
339 cal_time_range INT NOT NULL,
340 cal_user VARCHAR(25) NULL,
341 cal_allow_nav CHAR(1) DEFAULT 'Y',
343 cal_include_empty CHAR(1) DEFAULT 'N',
344 cal_show_in_trailer CHAR(1) DEFAULT 'N',
345 cal_update_date INT NOT NULL,
346 PRIMARY KEY ( cal_report_id )
348 CREATE TABLE webcal_report_template (
349 cal_report_id INT NOT NULL,
350 cal_template_type CHAR(1) NOT NULL,
351 cal_template_text TEXT,
352 PRIMARY KEY ( cal_report_id, cal_template_type )
354 CREATE TABLE webcal_import_data (
356 cal_login VARCHAR(25) NOT NULL,
357 cal_import_type VARCHAR(15) NOT NULL,
358 cal_external_id VARCHAR(200) NULL,
359 PRIMARY KEY ( cal_id, cal_login )
362 <p>For Oracle, use VARCHAR2 instead of VARCHAR.</p>
363 <a href="UPGRADING.html#dot943">next..</a>
366 <h4><a id="dot943">To upgrade from v0.9.42 to v0.9.43:</a></h4>
367 <p>User passwords are now stored using md5 and require the webcal_user
368 table to be altered to accomodate larger password data.
369 Use the following SQL for MySQL:</p>
371 ALTER TABLE webcal_user MODIFY cal_passwd VARCHAR(32) NULL;
372 DROP TABLE webcal_import_data;
373 CREATE TABLE webcal_import (
374 cal_import_id INT NOT NULL,
375 cal_name VARCHAR(50) NULL,
376 cal_date INT NOT NULL,
377 cal_type VARCHAR(10) NOT NULL,
378 cal_login VARCHAR(25) NULL,
379 PRIMARY KEY ( cal_import_id )
381 CREATE TABLE webcal_import_data (
382 cal_import_id INT NOT NULL,
384 cal_login VARCHAR(25) NOT NULL,
385 cal_import_type VARCHAR(15) NOT NULL,
386 cal_external_id VARCHAR(200) NULL,
387 PRIMARY KEY ( cal_id, cal_login )
391 <p>Postgres does not allow you to modify an existing table column.
392 Instead of the initial ALTER command above, issue the following
393 commands below. You <b>will not need to run</b> the convert_passwords
394 script below since this will <b>set all user's passwords to 'admin'</b>.</p>
397 ALTER TABLE webcal_user RENAME COLUMN cal_passwd to cal_oldpass;
398 ALTER TABLE webcal_user ADD COLUMN cal_passwd VARCHAR(32) NULL;
399 UPDATE webcal_user SET cal_passwd = '21232f297a57a5a743894a0e4a801fc3';
402 <p>For Oracle, use VARCHAR2 instead of VARCHAR.
403 On very old MySQL installations (not sure which version), if you get
404 a parse error, you can try the following instead:</p>
405 <pre>ALTER TABLE webcal_user CHANGE cal_passwd cal_passwd VARCHAR(32) NULL;</pre>
407 <p>Next, you will need to run the script found in the <tt>tools</tt>
408 subdirectory. This will convert all your passwords from plain text
409 to md5. You can either run this from the command line (if you have
410 a standalone version of PHP compiled):</p>
413 php convert_passwords.php
416 <p>If you do not have a standalone version of PHP, you can just type in
417 the URL to access the script in your browser:
419 <tt>http://yourcalendarurl/tools/convert_passwords.php</tt><br /></p>
421 <p>Delete all webcalendar_login browser cookies. Details should be available on
422 your local browser help section.
425 <a href="UPGRADING.html#dot944">next..</a>
428 <h4><a id="dot944">To upgrade from v0.9.43 to v0.9.44:</a></h4>
429 <p>No manual changes required for upgrading from 0.9.43 to 0.9.44.</p>
430 <a href="UPGRADING.html#dot945">next..</a>
433 <h4><a id="dot945">To upgrade from v0.9.44 to v0.9.45:</a></h4>
434 <p>There are no database changes from 0.9.44 to 0.9.45.
435 However, the database settings were moved from <tt>includes/config.php</tt>
436 to a new file <tt>includes/settings.php</tt>.
437 This new file does not exist until you create it.</p>
438 <p>The first time you attempt to access WebCalendar with the new 0.9.45 files,
439 your browser will be redirected to a web-based admin page for configuring
440 the database settings. You will need to make sure the <tt>includes</tt>
441 directory is writable by the web server user.
442 The simplest solution is to make it writable by all users until you
443 have correctly setup your database connection. Then, you can change it
444 to more restrictive permissions.
446 <p>After saving your database settings, be sure to setup an install
447 password via this same web page so that other users may not change
448 your database settings.</p>
449 <a href="UPGRADING.html#1dot0RC1">next..</a>
452 <h4><a id="1dot0RC1">To upgrade from v0.9.45 or 1.0RC1 to v1.0RC2:</a></h4>
453 <p>There are no database changes from 0.9.45 to 1.0RC2.
455 <a href="UPGRADING.html#1dot0RC3">next..</a>
458 <h4><a id="1dot0RC3">To upgrade from v1.0RC2 to v1.0RC3 or 1.0.0:</a></h4>
459 <p>The <tt>webcal_view</tt> table was modified.
460 Execute the following SQL to update your database:
463 ALTER TABLE webcal_view ADD cal_is_global CHAR(1) DEFAULT 'N' NOT NULL;
464 UPDATE webcal_user_pref SET cal_value = 'day.php' WHERE cal_value = 'day' AND cal_setting = 'STARTVIEW';
465 UPDATE webcal_user_pref SET cal_value = 'week.php' WHERE cal_value = 'week' AND cal_setting = 'STARTVIEW';
466 UPDATE webcal_user_pref SET cal_value = 'month.php' WHERE cal_value = 'month' AND cal_setting = 'STARTVIEW';
467 UPDATE webcal_user_pref SET cal_value = 'year.php' WHERE cal_value = 'year' AND cal_setting = 'STARTVIEW';
468 UPDATE webcal_config SET cal_value = 'week.php' WHERE cal_setting = 'STARTVIEW';
473 <a href="http://validator.w3.org/check?uri=referer"><img
474 src="http://www.w3.org/Icons/valid-xhtml10"
475 alt="Valid XHTML 1.0!" class="valid" /></a>