From 5e4d6cab00cb29cd088ab7b62ab13aff103b64cb Mon Sep 17 00:00:00 2001 From: onefang Date: Sun, 19 May 2019 21:24:15 +1000 Subject: Dump OpenSim 0.9.0.1 into it's own branch. --- .../Data/MySQL/Resources/UserAccount.migrations | 56 ++++++++-------------- 1 file changed, 20 insertions(+), 36 deletions(-) (limited to 'OpenSim/Data/MySQL/Resources/UserAccount.migrations') 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 @@ -:VERSION 1 # ------------------------- +:VERSION 5 # ------------------------- BEGIN; -CREATE TABLE `UserAccounts` ( - `PrincipalID` CHAR(36) NOT NULL, - `ScopeID` CHAR(36) NOT NULL, - `FirstName` VARCHAR(64) NOT NULL, - `LastName` VARCHAR(64) NOT NULL, - `Email` VARCHAR(64), - `ServiceURLs` TEXT, - `Created` INT(11) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE IF NOT EXISTS `UserAccounts` ( + `PrincipalID` char(36) NOT NULL, + `ScopeID` char(36) NOT NULL, + `FirstName` varchar(64) NOT NULL, + `LastName` varchar(64) NOT NULL, + `Email` varchar(64) DEFAULT NULL, + `ServiceURLs` text, + `Created` int(11) DEFAULT NULL, + `UserLevel` int(11) NOT NULL DEFAULT '0', + `UserFlags` int(11) NOT NULL DEFAULT '0', + `UserTitle` varchar(64) NOT NULL DEFAULT '', + UNIQUE KEY `PrincipalID` (`PrincipalID`), + KEY `Email` (`Email`), + KEY `FirstName` (`FirstName`), + KEY `LastName` (`LastName`), + KEY `Name` (`FirstName`,`LastName`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; COMMIT; -:VERSION 2 # ------------------------- +:VERSION 6 # ------------------------- BEGIN; -INSERT 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; +ALTER TABLE `UserAccounts` ADD `active` INT NOT NULL DEFAULT '1'; COMMIT; - -:VERSION 3 # ------------------------- - -BEGIN; - -CREATE UNIQUE INDEX PrincipalID ON UserAccounts(PrincipalID); -CREATE INDEX Email ON UserAccounts(Email); -CREATE INDEX FirstName ON UserAccounts(FirstName); -CREATE INDEX LastName ON UserAccounts(LastName); -CREATE INDEX Name ON UserAccounts(FirstName,LastName); - -COMMIT; - -:VERSION 4 # ------------------------- - -BEGIN; - -ALTER TABLE UserAccounts ADD COLUMN UserLevel integer NOT NULL DEFAULT 0; -ALTER TABLE UserAccounts ADD COLUMN UserFlags integer NOT NULL DEFAULT 0; -ALTER TABLE UserAccounts ADD COLUMN UserTitle varchar(64) NOT NULL DEFAULT ''; - -COMMIT; - - -- cgit v1.1