forked from Kunena/Kunena-Forum
-
Notifications
You must be signed in to change notification settings - Fork 2
/
kunena.install.upgrade.xml
349 lines (345 loc) · 24 KB
/
kunena.install.upgrade.xml
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
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
<?xml version="1.0" ?>
<!DOCTYPE comupgrade>
<comupgrade version="1.0">
<upgrade>
<version version="1.0.0" versiondate="2007-04-15" versionname="">
<query mode="silenterror">ALTER TABLE `#__kunena_attachments` ADD KEY `mesid`(`mesid`)</query>
<query mode="silenterror">ALTER TABLE `#__kunena_categories` ADD PRIMARY KEY(`id`)</query>
<query mode="silenterror">ALTER TABLE `#__kunena_categories` ADD KEY `parent`(`parent`)</query>
<query mode="silenterror">ALTER TABLE `#__kunena_categories` ADD KEY `published_pubaccess_id`(`published`,`pub_access`,`id`)</query>
<query mode="silenterror">ALTER TABLE `#__kunena_categories` DROP KEY `catid` </query>
<query mode="silenterror">ALTER TABLE `#__kunena_categories` DROP KEY `catparent`</query>
<query mode="silenterror">ALTER TABLE `#__kunena_messages` ADD KEY `hold_time`(`hold`,`time`)</query>
<query mode="silenterror">ALTER TABLE `#__kunena_messages` ADD KEY `locked`(`locked`)</query>
<query mode="silenterror">ALTER TABLE `#__kunena_messages` ADD KEY `time`(`time`)</query>
<query mode="silenterror">ALTER TABLE `#__kunena_messages` DROP KEY `id`</query>
<query mode="silenterror">ALTER TABLE `#__kunena_messages_text` DROP KEY `mesid`</query>
<query mode="silenterror">ALTER TABLE `#__kunena_messages_text` ADD PRIMARY KEY(`mesid`)</query>
<query mode="silenterror">ALTER TABLE `#__kunena_moderation` DROP KEY `catid`</query>
<query mode="silenterror">ALTER TABLE `#__kunena_users` ADD COLUMN `group_id` int(4) NULL DEFAULT '1' AFTER `karma_time`</query>
<query mode="silenterror">ALTER TABLE `#__kunena_users` ADD COLUMN `uhits` int(11) NULL DEFAULT '0' AFTER `group_id`</query>
<query mode="silenterror">ALTER TABLE `#__kunena_users` ADD KEY `group_id`(`group_id`)</query>
<query mode="silenterror">ALTER TABLE `#__kunena_whoisonline` ADD KEY `userid`(`userid`)</query>
<query mode="silenterror">UPDATE `#__kunena_messages_text` SET `message` = REPLACE(`message`, "<br><br>", "\n\n")</query>
<query mode="silenterror">INSERT INTO `#__kunena_groups` VALUES ('1', 'Registered User')</query>
</version>
<version version="1.0.1" versiondate="2007-05-20" versionname="">
<query mode="silenterror">ALTER TABLE `#__kunena_categories` MODIFY `moderated` tinyint(4) NOT NULL default '1' AFTER `alert_admin`;</query>
<query mode="silenterror">ALTER TABLE `#__kunena_categories` ADD COLUMN `id_last_msg` int(10) NOT NULL DEFAULT '0' AFTER `description`</query>
<query mode="silenterror">ALTER TABLE `#__kunena_categories` ADD COLUMN `numTopics` mediumint(8) NOT NULL DEFAULT '0' AFTER `id_last_msg`</query>
<query mode="silenterror">ALTER TABLE `#__kunena_categories` ADD COLUMN `numPosts` mediumint(8) NOT NULL DEFAULT '0' AFTER `numTopics`</query>
<query mode="silenterror">ALTER TABLE `#__kunena_categories` ADD COLUMN `time_last_msg` int(11) NULL AFTER `numPosts`</query>
<query mode="silenterror">ALTER TABLE `#__kunena_categories` ADD KEY `msg_id`(`id_last_msg`)</query>
<query mode="silenterror">ALTER TABLE `#__kunena_messages` ADD COLUMN `modified_by` int(7) NULL AFTER `moved`</query>
<query mode="silenterror">ALTER TABLE `#__kunena_messages` ADD COLUMN `modified_time` int(11) NULL AFTER `modified_by`</query>
<query mode="silenterror">ALTER TABLE `#__kunena_messages` ADD COLUMN `modified_reason` tinytext NULL AFTER `modified_time`</query>
<query mode="silenterror">ALTER TABLE `#__kunena_users` ADD COLUMN `personalText` tinytext NULL AFTER `uhits`</query>
<query mode="silenterror">ALTER TABLE `#__kunena_users` ADD COLUMN `gender` tinyint(4) NOT NULL DEFAULT '0' AFTER `personalText`</query>
<query mode="silenterror">ALTER TABLE `#__kunena_users` ADD COLUMN `birthdate` date NOT NULL DEFAULT '0001-01-01' AFTER `gender`</query>
<query mode="silenterror">ALTER TABLE `#__kunena_users` ADD COLUMN `location` varchar(50) NULL AFTER `birthdate`</query>
<query mode="silenterror">ALTER TABLE `#__kunena_users` ADD COLUMN `ICQ` varchar(50) NULL AFTER `location`</query>
<query mode="silenterror">ALTER TABLE `#__kunena_users` ADD COLUMN `AIM` varchar(50) NULL AFTER `ICQ`</query>
<query mode="silenterror">ALTER TABLE `#__kunena_users` ADD COLUMN `YIM` varchar(50) NULL AFTER `AIM`</query>
<query mode="silenterror">ALTER TABLE `#__kunena_users` ADD COLUMN `MSN` varchar(50) NULL AFTER `YIM`</query>
<query mode="silenterror">ALTER TABLE `#__kunena_users` ADD COLUMN `SKYPE` varchar(50) NULL AFTER `MSN`</query>
<query mode="silenterror">ALTER TABLE `#__kunena_users` ADD COLUMN `hideEmail` tinyint(1) NOT NULL DEFAULT '1' AFTER `SKYPE`</query>
<query mode="silenterror">ALTER TABLE `#__kunena_users` ADD COLUMN `showOnline` tinyint(1) NOT NULL DEFAULT '1' AFTER `hideEmail`</query>
<query mode="silenterror">ALTER TABLE `#__kunena_users` ADD COLUMN `rank` tinyint(4) NOT NULL DEFAULT '0' AFTER `showOnline`</query>
<query mode="silenterror">ALTER TABLE `#__kunena_users` ADD COLUMN `GTALK` varchar(50) NULL AFTER `rank`</query>
<query mode="silenterror">ALTER TABLE `#__kunena_users` ADD COLUMN `websitename` varchar(50) NULL AFTER `GTALK`</query>
<query mode="silenterror">ALTER TABLE `#__kunena_users` ADD COLUMN `websiteurl` varchar(50) NULL AFTER `websitename`</query>
<query>UPDATE `#__kunena_categories` SET `moderated` = '1';</query>
</version>
<version version="1.0.2" versiondate="2007-08-03" versionname="">
<query mode="silenterror">ALTER TABLE `#__kunena_categories` ADD COLUMN `headerdesc` text NOT NULL AFTER `description`</query>
<query mode="silenterror">ALTER TABLE `#__kunena_categories` ADD COLUMN `class_sfx` varchar(20) NOT NULL AFTER `headerdesc`</query>
</version>
<version version="1.0.3" versiondate="2007-09-04" versionname="">
<query mode="silenterror">ALTER TABLE `#__kunena_sessions` ADD COLUMN `currvisit` int(11) NOT NULL default '0' AFTER `readtopics`</query>
</version>
<version version="1.0.4" versiondate="2007-12-23" versionname="">
<query mode="silenterror">ALTER TABLE `#__kunena_announcement` MODIFY `title` tinytext NOT NULL AFTER `id`;</query>
</version>
<version version="1.0.5" versiondate="2008-12-1" versionname="Redwood">
<query>UPDATE `#__kunena_users` SET `rank`=8 WHERE `moderator`=1 AND `rank`=0</query>
<query>UPDATE `#__kunena_messages_text` SET `message` = REPLACE(`message`, "&amp;#039;", "'")</query>
<query>UPDATE `#__kunena_messages_text` SET `message` = REPLACE(`message`, "&amp;quot;", '"')</query>
<query>UPDATE `#__kunena_messages_text` SET `message` = REPLACE(`message`, "&amp;nbsp;", " ")</query>
<query>UPDATE `#__kunena_messages_text` SET `message` = REPLACE(`message`, "&lt;br />", "\n")</query>
<query>UPDATE `#__kunena_messages_text` SET `message` = REPLACE(`message`, "&lt;br>", "\n")</query>
<query>UPDATE `#__kunena_messages_text` SET `message` = REPLACE(`message`, "&amp;lt;", "<")</query>
<query>UPDATE `#__kunena_messages_text` SET `message` = REPLACE(`message`, "&amp;gt;", ">")</query>
<query>UPDATE `#__kunena_messages_text` SET `message` = REPLACE(`message`, "&amp;amp;", "&")</query>
<query>UPDATE `#__kunena_messages_text` SET `message` = REPLACE(`message`, "[IMG", "[img")</query>
<query>UPDATE `#__kunena_messages_text` SET `message` = REPLACE(`message`, "[/IMG]", "[/img]")</query>
<query>UPDATE `#__kunena_messages_text` SET `message` = REPLACE(`message`, "[URL", "[url")</query>
<query>UPDATE `#__kunena_messages_text` SET `message` = REPLACE(`message`, "[/URL]", "[/url]")</query>
<query>UPDATE `#__kunena_messages_text` SET `message` = REPLACE(`message`, "[QUOTE", "[quote")</query>
<query>UPDATE `#__kunena_messages_text` SET `message` = REPLACE(`message`, "[/QUOTE]", "[/quote]")</query>
<query>UPDATE `#__kunena_messages_text` SET `message` = REPLACE(`message`, "[CODE", "[code")</query>
<query>UPDATE `#__kunena_messages_text` SET `message` = REPLACE(`message`, "[/CODE", "[/code")</query>
<query>UPDATE `#__kunena_users` SET `signature` = REPLACE(`signature`, "&amp;#039;", "'")</query>
<query>UPDATE `#__kunena_users` SET `signature` = REPLACE(`signature`, "&amp;quot;", '"')</query>
<query>UPDATE `#__kunena_users` SET `signature` = REPLACE(`signature`, "&amp;nbsp;", " ")</query>
<query>UPDATE `#__kunena_users` SET `signature` = REPLACE(`signature`, "&lt;br />", "\n")</query>
<query>UPDATE `#__kunena_users` SET `signature` = REPLACE(`signature`, "&lt;br>", "\n")</query>
<query>UPDATE `#__kunena_users` SET `signature` = REPLACE(`signature`, "&amp;lt;", "<")</query>
<query>UPDATE `#__kunena_users` SET `signature` = REPLACE(`signature`, "&amp;gt;", ">")</query>
<query>UPDATE `#__kunena_users` SET `signature` = REPLACE(`signature`, "&amp;amp;", "&")</query>
<query>UPDATE `#__kunena_users` SET `signature` = REPLACE(`signature`, "[IMG", "[img")</query>
<query>UPDATE `#__kunena_users` SET `signature` = REPLACE(`signature`, "[/IMG]", "[/img]")</query>
<query>UPDATE `#__kunena_users` SET `signature` = REPLACE(`signature`, "[URL", "[url")</query>
<query>UPDATE `#__kunena_users` SET `signature` = REPLACE(`signature`, "[/URL]", "[/url]")</query>
<query>UPDATE `#__kunena_users` SET `signature` = REPLACE(`signature`, "[QUOTE", "[quote")</query>
<query>UPDATE `#__kunena_users` SET `signature` = REPLACE(`signature`, "[/QUOTE]", "[/quote]")</query>
<query>UPDATE `#__kunena_users` SET `signature` = REPLACE(`signature`, "[CODE", "[code")</query>
<query>UPDATE `#__kunena_users` SET `signature` = REPLACE(`signature`, "[/CODE", "[/code")</query>
</version>
<version version="1.0.6" versiondate="2009-01-10" versionname="Communicate">
<query mode="silenterror">ALTER TABLE `#__kunena_messages` ADD KEY `parent_hits`(`parent`,`hits`)</query>
<query mode="silenterror">ALTER TABLE `#__kunena_users` ADD KEY `posts` ( `posts` )</query>
<query mode="silenterror">ALTER TABLE `#__kunena_users` ADD KEY `uhits` ( `uhits` )</query>
</version>
<version version="1.0.8" versiondate="2009-02-17" versionname="Speakup!">
<phpfile name="upgrade-1.0.8_favorites" />
<!-- query mode="silenterror">ALTER TABLE `#__kunena_config` CHANGE `annmodid` `annmodid` TEXT NULL DEFAULT NULL</query>
<query mode="silenterror">ALTER TABLE `#__kunena_config` CHANGE `latestcategory` `latestcategory` TEXT NULL DEFAULT NULL</query>
<query mode="silenterror">UPDATE `#__kunena_config` SET `latestcategory`=''</query -->
<query>UPDATE `#__kunena_users` SET `view`='flat'</query>
<query>UPDATE `#__kunena_messages_text` SET `message` = REPLACE(`message`, "com_fireboard", "com_kunena")</query>
<query>UPDATE `#__kunena_users` SET `signature` = REPLACE(`signature`, "com_fireboard", "com_kunena")</query>
</version>
<version version="1.0.10" versiondate="2009-05-21" versionname="Parier!">
<!-- query mode="silenterror">UPDATE `#__kunena_config` SET `jmambot`='0'</query -->
</version>
<version version="1.6.0-ALPHA" versiondate="2010-05-30" versionname="Gespraech">
<query mode="silenterror">ALTER TABLE `#__kunena_users`
ADD `TWITTER` VARCHAR( 50 ) NULL AFTER `SKYPE` ,
ADD `FACEBOOK` VARCHAR( 50 ) NULL AFTER `TWITTER` ,
ADD `MYSPACE` VARCHAR( 50 ) NULL AFTER `GTALK` ,
ADD `LINKEDIN` VARCHAR( 50 ) NULL AFTER `MYSPACE` ,
ADD `DELICIOUS` VARCHAR( 50 ) NULL AFTER `LINKEDIN` ,
ADD `FRIENDFEED` VARCHAR( 50 ) NULL AFTER `DELICIOUS` ,
ADD `DIGG` VARCHAR( 50 ) NULL AFTER `FRIENDFEED` ,
ADD `BLOGSPOT` VARCHAR( 50 ) NULL AFTER `DIGG` ,
ADD `FLICKR` VARCHAR( 50 ) NULL AFTER `BLOGSPOT` ,
ADD `BEBO` VARCHAR( 50 ) NULL AFTER `FLICKR` ;</query>
<query mode="silenterror">ALTER TABLE `#__kunena_categories`
ADD `allow_polls` tinyint(4) NOT NULL default '0' AFTER `class_sfx` ;</query>
<query mode="silenterror">ALTER TABLE `#__kunena_categories` ADD `allow_anonymous` TINYINT NOT NULL DEFAULT '0' AFTER `review` ,
ADD `post_anonymous` TINYINT NOT NULL DEFAULT '0' AFTER `allow_anonymous` </query>
<query mode="silenterror">ALTER TABLE `#__kunena_sessions` ADD KEY `currvisit` ( `currvisit` )</query>
<query>UPDATE `#__kunena_messages` SET thread=id WHERE parent=0</query>
<query mode="silenterror">UPDATE `#__kunena_users` AS u, `#__users` AS j SET u.moderator='0' WHERE j.id=u.userid AND j.gid IN (24, 25)</query>
<phpfile name="upgrade-1.6.0_attachments"></phpfile>
<phpfile name="upgrade-1.6.0_configuration"></phpfile>
<phpfile name="upgrade-1.6.0_polls"></phpfile>
<phpfile name="upgrade-1.6.0_timezone"></phpfile>
</version>
<version version="1.6.0-ALPHA2" versiondate="2010-06-21" versionname="Gespraech">
<query mode="silenterror">DROP TABLE IF EXISTS `#__kunena_banned_users`</query>
<query mode="silenterror">ALTER TABLE `#__kunena_users`
ADD `banned` DATETIME NULL DEFAULT NULL AFTER `moderator`</query>
<phpfile name="upgrade-1.6.0_old_mt12"></phpfile>
</version>
<version version="1.6.0-RC1" versiondate="2010-08-09" versionname="Kujadili">
<query mode="silenterror">ALTER TABLE `#__kunena_users` ADD KEY `banned` ( `banned` )</query>
<query>ALTER TABLE `#__kunena_polls` MODIFY `polltimetolive` DATETIME NULL DEFAULT NULL;</query>
<query>ALTER TABLE `#__kunena_polls_options` MODIFY `text` varchar(100) NULL;</query>
<query>ALTER TABLE `#__kunena_thankyou` MODIFY `time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP;</query>
<query>ALTER TABLE `#__kunena_users_banned` MODIFY `expiration` DATETIME NULL;</query>
<query>ALTER TABLE `#__kunena_users_banned` MODIFY `created_time` DATETIME NOT NULL;</query>
<query>ALTER TABLE `#__kunena_users_banned` MODIFY `modified_time` DATETIME NULL;</query>
</version>
<version version="1.6.0-RC3" versiondate="2010-09-20" versionname="Jadili">
<query mode="silenterror">ALTER TABLE `#__kunena_messages` DROP INDEX `catid`;</query>
<query mode="silenterror">ALTER TABLE `#__kunena_messages` DROP INDEX `parent`;</query>
<query mode="silenterror">ALTER TABLE `#__kunena_messages` ADD INDEX `catid_parent` ( `catid`, `parent` );</query>
</version>
<version version="1.6.0" versiondate="2010-10-03" versionname="Spika">
</version>
<version version="1.6.1" versiondate="2010-11-06" versionname="Timu">
<phpfile name="upgrade-1.6.1_delfiles"></phpfile>
</version>
<version version="1.6.2" versiondate="2010-12-29" versionname="Team">
</version>
<version version="1.6.3" versiondate="2011-01-31" versionname="Parlare">
<query mode="silenterror">
ALTER TABLE `#__kunena_categories`
ADD `accesstype` varchar(20) NOT NULL default 'none' AFTER `moderators`,
ADD `access` int(11) NOT NULL default '0' AFTER `accesstype`,
ADD KEY `category_access` (accesstype,access);
</query>
<query mode="silenterror">ALTER TABLE `#__kunena_whoisonline` DROP INDEX `userip`;</query>
<query mode="silenterror">
ALTER TABLE `#__kunena_whoisonline`
MODIFY `id` INT( 11 ) NOT NULL AUTO_INCREMENT ,
MODIFY `userid` INT( 11 ) NOT NULL DEFAULT '0',
ADD INDEX `userid_userip` ( `userid` , `userip` ),
ADD INDEX `func` ( `func` ),
ADD INDEX `time` ( `time` );
</query>
</version>
<version version="1.6.5" versiondate="2011-07-27" build="5005" versionname="Babel">
</version>
<version version="1.7.0" versiondate="2011-08-29" build="5135" versionname="Tale">
</version>
<version version="1.7.1" versiondate="2011-11-16" build="5162" versionname="UnderUret">
</version>
<version version="2.0.0-DEV" versiondate="2011-08-01" versionname="Internal">
<!-- From Kunena 1.6.4 -->
<query mode="silenterror">ALTER TABLE `#__kunena_users` ADD INDEX `moderator` ( `moderator` );</query>
<query mode="silenterror">ALTER TABLE `#__kunena_categories` MODIFY `ordering` smallint(6) NOT NULL default '0' AFTER `admin_recurse`;</query>
<!-- Kunena 2.0 -->
<query mode="silenterror">
ALTER TABLE `#__kunena_categories`
DROP `alert_admin`,
DROP `moderators`,
DROP `future2`,
DROP `id_last_msg`,
DROP `time_last_msg`,
DROP INDEX `parent`,
DROP INDEX `msg_id`;
</query>
<query mode="silenterror">
ALTER TABLE `#__kunena_categories`
CHANGE `parent` `parent_id` INT( 11 ) NULL DEFAULT '0',
CHANGE `cat_emoticon` `icon_id` TINYINT( 4 ) NOT NULL DEFAULT '0',
ADD `last_topic_id` int(11) NOT NULL default '0' AFTER `numPosts`,
ADD `last_post_id` int(11) NOT NULL default '0' AFTER `last_topic_id`,
ADD `last_post_time` int(11) NOT NULL default '0' AFTER `last_post_id`,
ADD `params` text NOT NULL AFTER `last_post_time`,
ADD KEY `parent_id` (parent_id);
</query>
<query>
INSERT IGNORE INTO #__kunena_user_topics (user_id, topic_id, category_id, posts, last_post_id, owner)
SELECT userid AS user_id, thread AS topic_id, catid AS category_id, COUNT(*) AS posts, MAX(id) AS last_post_id, MAX(IF(parent=0,1,0)) AS owner
FROM #__kunena_messages WHERE userid>0 AND moved=0 AND hold=0
GROUP BY user_id, topic_id;
</query>
<query mode="silenterror">
INSERT INTO #__kunena_user_topics (user_id, topic_id, category_id, favorite)
SELECT f.userid AS user_id, m.thread AS topic_id, m.catid AS category_id, 1 AS favorite
FROM #__kunena_favorites AS f
INNER JOIN #__kunena_messages AS m ON m.id=f.thread
WHERE f.userid>0
ON DUPLICATE KEY UPDATE favorite=1;
</query>
<query mode="silenterror">
INSERT INTO #__kunena_user_topics (user_id, topic_id, category_id, subscribed)
SELECT s.userid AS user_id, m.thread AS topic_id, m.catid AS category_id, 1 AS subscribed
FROM #__kunena_subscriptions AS s
INNER JOIN #__kunena_messages AS m ON m.id=s.thread
WHERE s.userid>0
ON DUPLICATE KEY UPDATE subscribed=1;
</query>
<query mode="silenterror">
INSERT INTO #__kunena_user_categories (user_id, category_id, subscribed)
SELECT userid AS user_id, catid AS category_id, 1 AS subscribed
FROM #__kunena_subscriptions_categories
WHERE userid>0
ON DUPLICATE KEY UPDATE subscribed=VALUES(subscribed);
</query>
<query>
UPDATE #__kunena_user_categories AS c INNER JOIN #__kunena_sessions AS s ON c.user_id=s.userid
SET c.allreadtime=FROM_UNIXTIME(s.lasttime);
</query>
<query>
UPDATE #__kunena_messages SET hold=3 WHERE parent=0 AND hold=2;
</query>
<query>
INSERT IGNORE INTO `#__kunena_topics`
(id, category_id, subject, icon_id, locked, hold, ordering, hits, poll_id, moved_id)
SELECT a.id, a.catid, a.subject, a.topic_emoticon, a.locked, a.hold, a.ordering, a.hits, p.id AS poll_id, 0 as moved_id
FROM #__kunena_messages AS a
LEFT JOIN #__kunena_polls AS p ON p.threadid=a.id
WHERE a.parent = 0 AND a.moved = 0 AND a.id=a.thread
GROUP BY a.id
</query>
<query>DROP TABLE IF EXISTS `#__kunena_attachments_bak` </query>
<query>DROP TABLE IF EXISTS `#__kunena_favorites`</query>
<query>DROP TABLE IF EXISTS `#__kunena_groups`</query>
<query>DROP TABLE IF EXISTS `#__kunena_subscriptions`</query>
<query>DROP TABLE IF EXISTS `#__kunena_subscriptions_categories`</query>
<query mode="silenterror">ALTER TABLE `#__kunena_categories` ADD `channels` TEXT NULL DEFAULT NULL AFTER `published`</query>
<query mode="silenterror">ALTER TABLE `#__kunena_users`
CHANGE `ICQ` `icq` VARCHAR(50) NULL DEFAULT NULL,
CHANGE `AIM` `aim` VARCHAR(50) NULL DEFAULT NULL,
CHANGE `YIM` `yim` VARCHAR(50) NULL DEFAULT NULL,
CHANGE `MSN` `msn` VARCHAR(50) NULL DEFAULT NULL,
CHANGE `SKYPE` `skype` VARCHAR(50) NULL DEFAULT NULL,
CHANGE `TWITTER` `twitter` VARCHAR(50) NULL DEFAULT NULL,
CHANGE `FACEBOOK` `facebook` VARCHAR(50) NULL DEFAULT NULL,
CHANGE `GTALK` `gtalk` VARCHAR(50) NULL DEFAULT NULL,
CHANGE `MYSPACE` `myspace` VARCHAR(50) NULL DEFAULT NULL,
CHANGE `LINKEDIN` `linkedin` VARCHAR(50) NULL DEFAULT NULL,
CHANGE `DELICIOUS` `delicious` VARCHAR(50) NULL DEFAULT NULL,
CHANGE `FRIENDFEED` `friendfeed` VARCHAR(50) NULL DEFAULT NULL,
CHANGE `DIGG` `digg` VARCHAR(50) NULL DEFAULT NULL,
CHANGE `BLOGSPOT` `blogspot` VARCHAR(50) NULL DEFAULT NULL,
CHANGE `FLICKR` `flickr` VARCHAR(50) NULL DEFAULT NULL,
CHANGE `BEBO` `bebo` VARCHAR(50) NULL DEFAULT NULL;</query>
<query mode="silenterror">ALTER TABLE `#__kunena_topics` ADD INDEX `posts` ( `posts` );</query>
<query mode="silenterror">ALTER TABLE `#__kunena_user_read` MODIFY `time` datetime NOT NULL;</query>
<query mode="silenterror">ALTER TABLE `#__kunena_thankyou` MODIFY `time` datetime NOT NULL;</query>
<phpfile name="upgrade-2.0.0_configuration"></phpfile>
<query mode="silenterror">ALTER TABLE `#__kunena_messages` MODIFY `ip` varchar(128) NULL AFTER `time`;</query>
<query mode="silenterror">ALTER TABLE `#__kunena_categories` ADD `topic_ordering` VARCHAR(16) NOT NULL default 'lastpost' AFTER `allow_polls`;</query>
</version>
<version version="2.0.0-DEV2" versiondate="2011-10-19" versionname="Internal">
<!-- From Kunena 1.6.5 -->
<query mode="silenterror">ALTER TABLE `#__kunena_users` MODIFY `avatar` varchar(255) NULL;</query>
<!-- Kunena 2.0 -->
<query mode="silenterror">ALTER TABLE `#__kunena_users` ADD `thankyou` int(11) NULL default '0' AFTER `showOnline`;</query>
<query mode="silenterror">ALTER TABLE `#__kunena_user_categories` DROP INDEX `category_id`;</query>
<query mode="silenterror">ALTER TABLE `#__kunena_user_categories`
ADD `role` tinyint(4) NOT NULL default '0' AFTER `category_id`,
ADD KEY `category_subscribed` (category_id,subscribed),
ADD KEY `role` (role);</query>
<query mode="silenterror">
INSERT INTO #__kunena_user_categories (user_id, category_id, role)
SELECT u.userid AS user_id, IF(m.catid>0,m.catid,0) AS category_id, 1 AS role
FROM #__kunena_users AS u
LEFT JOIN #__kunena_moderation AS m ON u.userid=m.userid
LEFT JOIN #__kunena_categories AS c ON m.catid=c.id
WHERE u.moderator='1' AND (m.catid IS NULL OR c.moderated='1')
ON DUPLICATE KEY UPDATE role=1
</query>
</version>
<version version="2.0.0-DEV6" versiondate="2011-12-14" versionname="Internal">
<query mode="silenterror">ALTER TABLE `#__kunena_categories` DROP `moderated`;</query>
<query>DROP TABLE IF EXISTS `#__kunena_moderation` </query>
<query>DROP TABLE IF EXISTS `#__kunena_config` </query>
<query>DROP TABLE IF EXISTS `#__kunena_config_backup` </query>
<query>DROP TABLE IF EXISTS `#__kunena_whoisonline` </query>
<query mode="silenterror">ALTER TABLE `#__kunena_categories`
DROP `last_topic_subject`,
DROP `last_topic_posts`,
DROP `last_post_userid`,
DROP `last_post_message`,
DROP `last_post_guest_name`</query>
<query mode="silenterror">ALTER TABLE `#__kunena_categories` ADD `alias` varchar(255) NOT NULL AFTER `name`;</query>
<phpfile name="upgrade-2.0.0_aliases"></phpfile>
</version>
<version version="2.0.0-DEV8" versiondate="2011-12-18" versionname="Internal">
<query mode="silenterror">ALTER TABLE `#__kunena_announcement` ADD `created_by` int(10) NOT NULL AFTER `title`;</query>
</version>
<version version="2.0.0-DEV12" versiondate="2012-02-03" versionname="Internal">
<query mode="silenterror">ALTER TABLE `#__kunena_polls_users` CHANGE `lasttime` `lasttime` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00'</query>
</version>
<version version="2.0.0-DEV13" versiondate="2012-03-15" versionname="Internal">
<query mode="silenterror">ALTER TABLE `#__kunena_categories` CHANGE `pub_access` `pub_access` int(11) NOT NULL default '1',
CHANGE `admin_access` `admin_access` int(11) NOT NULL default '1'</query>
</version>
<version version="2.0.0-DEV14" versiondate="2012-04-09" versionname="Internal">
<query mode="silenterror">ALTER TABLE `#__kunena_users_banned` ADD KEY `created_time` (created_time);</query>
</version>
<version version="2.0.0-DEV15" versiondate="2012-04-13" versionname="Internal">
<phpfile name="upgrade-2.0.0_menu"></phpfile>
</version>
<version version="2.0.0-BETA1" versiondate="2012-04-24" versionname="Newspeak">
</version>
<version version="@kunenaversion@" versiondate="@kunenaversiondate@" versionname="@kunenaversionname@">
</version>
</upgrade>
</comupgrade>