aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL/Resources/UserAccount.migrations
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/MySQL/Resources/UserAccount.migrations56
1 files changed, 20 insertions, 36 deletions
diff --git a/OpenSim/Data/MySQL/Resources/UserAccount.migrations b/OpenSim/Data/MySQL/Resources/UserAccount.migrations
index 97e5e4f..98be097 100644
--- a/OpenSim/Data/MySQL/Resources/UserAccount.migrations
+++ b/OpenSim/Data/MySQL/Resources/UserAccount.migrations
@@ -1,47 +1,31 @@
1:VERSION 1 # ------------------------- 1:VERSION 5 # -------------------------
2 2
3BEGIN; 3BEGIN;
4 4
5CREATE TABLE `UserAccounts` ( 5CREATE TABLE IF NOT EXISTS `UserAccounts` (
6 `PrincipalID` CHAR(36) NOT NULL, 6 `PrincipalID` char(36) NOT NULL,
7 `ScopeID` CHAR(36) NOT NULL, 7 `ScopeID` char(36) NOT NULL,
8 `FirstName` VARCHAR(64) NOT NULL, 8 `FirstName` varchar(64) NOT NULL,
9 `LastName` VARCHAR(64) NOT NULL, 9 `LastName` varchar(64) NOT NULL,
10 `Email` VARCHAR(64), 10 `Email` varchar(64) DEFAULT NULL,
11 `ServiceURLs` TEXT, 11 `ServiceURLs` text,
12 `Created` INT(11) 12 `Created` int(11) DEFAULT NULL,
13) ENGINE=MyISAM DEFAULT CHARSET=utf8; 13 `UserLevel` int(11) NOT NULL DEFAULT '0',
14 `UserFlags` int(11) NOT NULL DEFAULT '0',
15 `UserTitle` varchar(64) NOT NULL DEFAULT '',
16 UNIQUE KEY `PrincipalID` (`PrincipalID`),
17 KEY `Email` (`Email`),
18 KEY `FirstName` (`FirstName`),
19 KEY `LastName` (`LastName`),
20 KEY `Name` (`FirstName`,`LastName`)
21) ENGINE=InnoDB DEFAULT CHARSET=utf8;
14 22
15COMMIT; 23COMMIT;
16 24
17:VERSION 2 # ------------------------- 25:VERSION 6 # -------------------------
18 26
19BEGIN; 27BEGIN;
20 28
21INSERT INTO UserAccounts (PrincipalID, ScopeID, FirstName, LastName, Email, ServiceURLs, Created) SELECT `UUID` AS PrincipalID, '00000000-0000-0000-0000-000000000000' AS ScopeID, username AS FirstName, lastname AS LastName, email as Email, CONCAT('AssetServerURI=', userAssetURI, ' InventoryServerURI=', userInventoryURI, ' GatewayURI= HomeURI=') AS ServiceURLs, created as Created FROM users; 29ALTER TABLE `UserAccounts` ADD `active` INT NOT NULL DEFAULT '1';
22 30
23COMMIT; 31COMMIT;
24
25:VERSION 3 # -------------------------
26
27BEGIN;
28
29CREATE UNIQUE INDEX PrincipalID ON UserAccounts(PrincipalID);
30CREATE INDEX Email ON UserAccounts(Email);
31CREATE INDEX FirstName ON UserAccounts(FirstName);
32CREATE INDEX LastName ON UserAccounts(LastName);
33CREATE INDEX Name ON UserAccounts(FirstName,LastName);
34
35COMMIT;
36
37:VERSION 4 # -------------------------
38
39BEGIN;
40
41ALTER TABLE UserAccounts ADD COLUMN UserLevel integer NOT NULL DEFAULT 0;
42ALTER TABLE UserAccounts ADD COLUMN UserFlags integer NOT NULL DEFAULT 0;
43ALTER TABLE UserAccounts ADD COLUMN UserTitle varchar(64) NOT NULL DEFAULT '';
44
45COMMIT;
46
47