diff options
Diffstat (limited to 'OpenSim/Data/MySQL/Resources/Presence.migrations')
-rw-r--r-- | OpenSim/Data/MySQL/Resources/Presence.migrations | 37 |
1 files changed, 11 insertions, 26 deletions
diff --git a/OpenSim/Data/MySQL/Resources/Presence.migrations b/OpenSim/Data/MySQL/Resources/Presence.migrations index 6dc9384..4d14b9d 100644 --- a/OpenSim/Data/MySQL/Resources/Presence.migrations +++ b/OpenSim/Data/MySQL/Resources/Presence.migrations | |||
@@ -1,31 +1,16 @@ | |||
1 | :VERSION 1 # -------------------------- | 1 | :VERSION 4 # -------------------------- |
2 | 2 | ||
3 | BEGIN; | 3 | BEGIN; |
4 | 4 | ||
5 | CREATE TABLE `Presence` ( | 5 | CREATE TABLE IF NOT EXISTS `Presence` ( |
6 | `UserID` VARCHAR(255) NOT NULL, | 6 | `UserID` varchar(255) NOT NULL, |
7 | `RegionID` CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', | 7 | `RegionID` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', |
8 | `SessionID` CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', | 8 | `SessionID` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', |
9 | `SecureSessionID` CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000' | 9 | `SecureSessionID` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', |
10 | ) ENGINE=MyISAM; | 10 | `LastSeen` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, |
11 | 11 | UNIQUE KEY `SessionID` (`SessionID`), | |
12 | CREATE UNIQUE INDEX SessionID ON Presence(SessionID); | 12 | KEY `UserID` (`UserID`), |
13 | CREATE INDEX UserID ON Presence(UserID); | 13 | KEY `RegionID` (`RegionID`) |
14 | 14 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | |
15 | COMMIT; | ||
16 | |||
17 | :VERSION 2 # -------------------------- | ||
18 | |||
19 | BEGIN; | ||
20 | |||
21 | ALTER TABLE `Presence` ADD COLUMN LastSeen timestamp; | ||
22 | |||
23 | COMMIT; | ||
24 | |||
25 | :VERSION 3 # -------------------------- | ||
26 | |||
27 | BEGIN; | ||
28 | |||
29 | CREATE INDEX RegionID ON Presence(RegionID); | ||
30 | 15 | ||
31 | COMMIT; | 16 | COMMIT; |