diff options
author | Diva Canto | 2016-02-20 19:08:02 -0800 |
---|---|---|
committer | Diva Canto | 2016-02-20 19:27:12 -0800 |
commit | 134e94a7e91adb7b4eb153c2df9b70096c4edfb4 (patch) | |
tree | 8cbff3cb2cd6114f505e34e289afed1f76ad3116 /OpenSim/Data/MySQL/Resources/UserAccount.migrations | |
parent | Merge branch 'master' of opensimulator.org:/var/git/opensim (diff) | |
download | opensim-SC-134e94a7e91adb7b4eb153c2df9b70096c4edfb4.zip opensim-SC-134e94a7e91adb7b4eb153c2df9b70096c4edfb4.tar.gz opensim-SC-134e94a7e91adb7b4eb153c2df9b70096c4edfb4.tar.bz2 opensim-SC-134e94a7e91adb7b4eb153c2df9b70096c4edfb4.tar.xz |
Flatten migrations for MySQL.
Conflicts:
OpenSim/Data/MySQL/Resources/RegionStore.migrations
OpenSim/Data/MySQL/Resources/UserAccount.migrations
Diffstat (limited to 'OpenSim/Data/MySQL/Resources/UserAccount.migrations')
-rw-r--r-- | OpenSim/Data/MySQL/Resources/UserAccount.migrations | 64 |
1 files changed, 17 insertions, 47 deletions
diff --git a/OpenSim/Data/MySQL/Resources/UserAccount.migrations b/OpenSim/Data/MySQL/Resources/UserAccount.migrations index 71f1cc4..b634343 100644 --- a/OpenSim/Data/MySQL/Resources/UserAccount.migrations +++ b/OpenSim/Data/MySQL/Resources/UserAccount.migrations | |||
@@ -1,54 +1,24 @@ | |||
1 | :VERSION 1 # ------------------------- | 1 | :VERSION 5 # ------------------------- |
2 | 2 | ||
3 | BEGIN; | 3 | BEGIN; |
4 | 4 | ||
5 | CREATE TABLE `UserAccounts` ( | 5 | CREATE 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 | `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`) | ||
13 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; | 21 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
14 | 22 | ||
15 | COMMIT; | 23 | COMMIT; |
16 | 24 | ||
17 | :VERSION 2 # ------------------------- | ||
18 | |||
19 | BEGIN; | ||
20 | |||
21 | 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; | ||
22 | |||
23 | COMMIT; | ||
24 | |||
25 | :VERSION 3 # ------------------------- | ||
26 | |||
27 | BEGIN; | ||
28 | |||
29 | CREATE UNIQUE INDEX PrincipalID ON UserAccounts(PrincipalID); | ||
30 | CREATE INDEX Email ON UserAccounts(Email); | ||
31 | CREATE INDEX FirstName ON UserAccounts(FirstName); | ||
32 | CREATE INDEX LastName ON UserAccounts(LastName); | ||
33 | CREATE INDEX Name ON UserAccounts(FirstName,LastName); | ||
34 | |||
35 | COMMIT; | ||
36 | |||
37 | :VERSION 4 # ------------------------- | ||
38 | |||
39 | BEGIN; | ||
40 | |||
41 | ALTER TABLE UserAccounts ADD COLUMN UserLevel integer NOT NULL DEFAULT 0; | ||
42 | ALTER TABLE UserAccounts ADD COLUMN UserFlags integer NOT NULL DEFAULT 0; | ||
43 | ALTER TABLE UserAccounts ADD COLUMN UserTitle varchar(64) NOT NULL DEFAULT ''; | ||
44 | |||
45 | COMMIT; | ||
46 | |||
47 | :VERSION 5 # ------------------------- | ||
48 | |||
49 | BEGIN; | ||
50 | |||
51 | ALTER TABLE `UserAccounts` ADD `active` INT NOT NULL DEFAULT '1'; | ||
52 | |||
53 | COMMIT; | ||
54 | |||