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

BEGIN;

CREATE TABLE `Presence` (
    `UserID` VARCHAR(255) NOT NULL,
    `RegionID` CHAR(36) NOT NULL,
    `SessionID` CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
    `SecureSessionID` CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
    `Online` CHAR(5) NOT NULL DEFAULT 'false',
    `Login` CHAR(16) NOT NULL DEFAULT '0',
    `Logout` CHAR(16) NOT NULL DEFAULT '0',
    `Position` CHAR(64) NOT NULL DEFAULT '<0,0,0>',
    `LookAt` CHAR(64) NOT NULL DEFAULT '<0,0,0>'
) ENGINE=InnoDB;

COMMIT;

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

BEGIN;

ALTER TABLE Presence ADD COLUMN `HomeRegionID` CHAR(36) NOT NULL;
ALTER TABLE Presence ADD COLUMN `HomePosition` CHAR(64) NOT NULL DEFAULT '<0,0,0>';
ALTER TABLE Presence ADD COLUMN `HomeLookAt` CHAR(64) NOT NULL DEFAULT '<0,0,0>';

COMMIT;

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

BEGIN;

CREATE UNIQUE INDEX SessionID ON Presence(SessionID);
CREATE INDEX UserID ON Presence(UserID);

COMMIT;