aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL/Resources/FriendsStore.migrations
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data/MySQL/Resources/FriendsStore.migrations')
-rw-r--r--OpenSim/Data/MySQL/Resources/FriendsStore.migrations36
1 files changed, 9 insertions, 27 deletions
diff --git a/OpenSim/Data/MySQL/Resources/FriendsStore.migrations b/OpenSim/Data/MySQL/Resources/FriendsStore.migrations
index 5de0e35..6840f07 100644
--- a/OpenSim/Data/MySQL/Resources/FriendsStore.migrations
+++ b/OpenSim/Data/MySQL/Resources/FriendsStore.migrations
@@ -1,32 +1,14 @@
1:VERSION 1 # ------------------------- 1:VERSION 4 # -------------------------
2 2
3BEGIN; 3BEGIN;
4 4
5CREATE TABLE `Friends` ( 5CREATE TABLE IF NOT EXISTS `Friends` (
6 `PrincipalID` CHAR(36) NOT NULL, 6 `PrincipalID` varchar(255) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
7 `Friend` VARCHAR(255) NOT NULL, 7 `Friend` varchar(255) NOT NULL,
8 `Flags` VARCHAR(16) NOT NULL DEFAULT 0, 8 `Flags` varchar(16) NOT NULL DEFAULT '0',
9 `Offered` VARCHAR(32) NOT NULL DEFAULT 0, 9 `Offered` varchar(32) NOT NULL DEFAULT '0',
10 PRIMARY KEY(`PrincipalID`, `Friend`), 10 PRIMARY KEY (`PrincipalID`(36),`Friend`(36)),
11 KEY(`PrincipalID`) 11 KEY `PrincipalID` (`PrincipalID`)
12) ENGINE=MyISAM; 12) ENGINE=InnoDB DEFAULT CHARSET=utf8;
13
14COMMIT;
15
16:VERSION 2 # -------------------------
17
18BEGIN;
19
20INSERT INTO `Friends` SELECT `ownerID`, `friendID`, `friendPerms`, 0 FROM `userfriends`;
21
22COMMIT;
23
24:VERSION 3 # -------------------------
25
26BEGIN;
27
28ALTER TABLE `Friends` MODIFY COLUMN PrincipalID varchar(255) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000';
29ALTER TABLE `Friends` DROP PRIMARY KEY;
30ALTER TABLE `Friends` ADD PRIMARY KEY(PrincipalID(36), Friend(36));
31 13
32COMMIT; 14COMMIT;