aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MSSQL/Resources/UserAccount.migrations
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/MSSQL/Resources/UserAccount.migrations55
1 files changed, 55 insertions, 0 deletions
diff --git a/OpenSim/Data/MSSQL/Resources/UserAccount.migrations b/OpenSim/Data/MSSQL/Resources/UserAccount.migrations
new file mode 100644
index 0000000..8534e23
--- /dev/null
+++ b/OpenSim/Data/MSSQL/Resources/UserAccount.migrations
@@ -0,0 +1,55 @@
1:VERSION 1
2
3CREATE TABLE [UserAccounts] (
4 [PrincipalID] uniqueidentifier NOT NULL,
5 [ScopeID] uniqueidentifier NOT NULL,
6 [FirstName] [varchar](64) NOT NULL,
7 [LastName] [varchar](64) NOT NULL,
8 [Email] [varchar](64) NULL,
9 [ServiceURLs] [text] NULL,
10 [Created] [int] default NULL,
11
12 PRIMARY KEY CLUSTERED
13(
14 [PrincipalID] ASC
15)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
16) ON [PRIMARY]
17
18
19:VERSION 2
20
21BEGIN TRANSACTION
22
23INSERT INTO UserAccounts (PrincipalID, ScopeID, FirstName, LastName, Email, ServiceURLs, Created) SELECT [UUID] AS PrincipalID, '00000000-0000-0000-0000-000000000000' AS ScopeID,
24username AS FirstName,
25lastname AS LastName,
26email as Email, (
27'AssetServerURI=' +
28userAssetURI + ' InventoryServerURI=' + userInventoryURI + ' GatewayURI= HomeURI=') AS ServiceURLs,
29created as Created FROM users;
30
31
32COMMIT
33
34:VERSION 3
35
36BEGIN TRANSACTION
37
38CREATE UNIQUE INDEX PrincipalID ON UserAccounts(PrincipalID);
39CREATE INDEX Email ON UserAccounts(Email);
40CREATE INDEX FirstName ON UserAccounts(FirstName);
41CREATE INDEX LastName ON UserAccounts(LastName);
42CREATE INDEX Name ON UserAccounts(FirstName,LastName);
43
44COMMIT
45
46:VERSION 4
47
48BEGIN TRANSACTION
49
50ALTER TABLE UserAccounts ADD UserLevel integer NOT NULL DEFAULT 0;
51ALTER TABLE UserAccounts ADD UserFlags integer NOT NULL DEFAULT 0;
52ALTER TABLE UserAccounts ADD UserTitle varchar(64) NOT NULL DEFAULT '';
53
54COMMIT
55