aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL/Resources/FriendsStore.migrations
blob: 35e5e93cdedc58d5e4f9e183212de9c448453f98 (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
:VERSION 1       # -------------------------

BEGIN;

CREATE TABLE `Friends` (
	`PrincipalID` CHAR(36) NOT NULL, 
	`Friend` VARCHAR(255) NOT NULL, 
	`Flags` VARCHAR(16) NOT NULL DEFAULT 0, 
	`Offered` VARCHAR(32) NOT NULL DEFAULT 0, 
	PRIMARY KEY(`PrincipalID`, `Friend`), 
	KEY(`PrincipalID`)
);

COMMIT;

:VERSION 2       # -------------------------

BEGIN;

INSERT INTO `Friends` SELECT `ownerID`, `friendID`, `friendPerms`, 0 FROM `userfriends`;

COMMIT;

:VERSION 3       # -------------------------

BEGIN;

ALTER TABLE `Friends` MODIFY COLUMN PrincipalID varchar(255) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000';

COMMIT;