aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL/Resources/UserAccount.migrations
diff options
context:
space:
mode:
authorMelanie2010-05-18 19:02:40 +0100
committerMelanie2010-05-18 19:03:16 +0100
commite260610c0096ac5323c32a7a593e5521997eb732 (patch)
tree5d936d6450d580cf24e133047df7ff8d759de557 /OpenSim/Data/MySQL/Resources/UserAccount.migrations
parentAllow remote admin to be used on a different port from the main region port (diff)
parentMS SQL migrations converted to the new format (diff)
downloadopensim-SC_OLD-e260610c0096ac5323c32a7a593e5521997eb732.zip
opensim-SC_OLD-e260610c0096ac5323c32a7a593e5521997eb732.tar.gz
opensim-SC_OLD-e260610c0096ac5323c32a7a593e5521997eb732.tar.bz2
opensim-SC_OLD-e260610c0096ac5323c32a7a593e5521997eb732.tar.xz
Merge branch 'Migrations'
This merges AlexRa's work on migration streamlining. This merge is experimental. If it causes issues, feel free to back out. Signed-off-by: Melanie <melanie@t-data.com>
Diffstat (limited to 'OpenSim/Data/MySQL/Resources/UserAccount.migrations')
-rw-r--r--OpenSim/Data/MySQL/Resources/UserAccount.migrations47
1 files changed, 47 insertions, 0 deletions
diff --git a/OpenSim/Data/MySQL/Resources/UserAccount.migrations b/OpenSim/Data/MySQL/Resources/UserAccount.migrations
new file mode 100644
index 0000000..84011e6
--- /dev/null
+++ b/OpenSim/Data/MySQL/Resources/UserAccount.migrations
@@ -0,0 +1,47 @@
1:VERSION 1 # -------------------------
2
3BEGIN;
4
5CREATE TABLE `UserAccounts` (
6 `PrincipalID` CHAR(36) NOT NULL,
7 `ScopeID` CHAR(36) NOT NULL,
8 `FirstName` VARCHAR(64) NOT NULL,
9 `LastName` VARCHAR(64) NOT NULL,
10 `Email` VARCHAR(64),
11 `ServiceURLs` TEXT,
12 `Created` INT(11)
13) ENGINE=InnoDB DEFAULT CHARSET=utf8;
14
15COMMIT;
16
17:VERSION 2 # -------------------------
18
19BEGIN;
20
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;
22
23COMMIT;
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