aboutsummaryrefslogtreecommitdiff
path: root/engine/schema/upgrades/2009100701.sql
blob: 62ffac354816254ba3542aac6b5eb3face871715 (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
SET NAMES utf8;

LOCK TABLES `prefix_metastrings` WRITE;
ALTER TABLE `prefix_metastrings` DISABLE KEYS;
REPLACE INTO `prefix_metastrings` (id, string)
	SELECT id, unhex(hex(convert(string using latin1)))
	FROM `prefix_metastrings`;
ALTER TABLE `prefix_metastrings` ENABLE KEYS;
UNLOCK TABLES;

LOCK TABLES `prefix_groups_entity` WRITE;
ALTER TABLE `prefix_groups_entity` DISABLE KEYS;
REPLACE INTO `prefix_groups_entity` (guid, name, description)
	SELECT guid, unhex(hex(convert(name using latin1))), unhex(hex(convert(description using latin1)))
	FROM `prefix_groups_entity`;
ALTER TABLE `prefix_groups_entity` ENABLE KEYS;
UNLOCK TABLES;

LOCK TABLES `prefix_objects_entity` WRITE;
ALTER TABLE `prefix_objects_entity` DISABLE KEYS;
REPLACE INTO `prefix_objects_entity` (guid, title, description)
	SELECT guid, unhex(hex(convert(title using latin1))), unhex(hex(convert(description using latin1)))
	FROM `prefix_objects_entity`;
ALTER TABLE `prefix_objects_entity` ENABLE KEYS;
UNLOCK TABLES;

LOCK TABLES `prefix_users_entity` WRITE;
ALTER TABLE `prefix_users_entity` DISABLE KEYS;
REPLACE INTO `prefix_users_entity` (guid, name, username, password, salt, email, language, code,
	banned, last_action, prev_last_action, last_login, prev_last_login)
		SELECT guid, unhex(hex(convert(name using latin1))), username, password, salt, email, language, code,
			banned, last_action, prev_last_action, last_login, prev_last_login
		FROM `prefix_users_entity`;
ALTER TABLE `prefix_users_entity` ENABLE KEYS;
UNLOCK TABLES;