aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MSSQL/Resources/UserAccount.migrations
diff options
context:
space:
mode:
authorAlexRa2010-05-06 23:16:36 +0300
committerAlexRa2010-05-18 22:16:13 +0300
commit020f38774fbe8e0f53b0cb28ab49b378b9dcd325 (patch)
tree5d936d6450d580cf24e133047df7ff8d759de557 /OpenSim/Data/MSSQL/Resources/UserAccount.migrations
parentMigrations for SQLite converted to new format (diff)
downloadopensim-SC-020f38774fbe8e0f53b0cb28ab49b378b9dcd325.zip
opensim-SC-020f38774fbe8e0f53b0cb28ab49b378b9dcd325.tar.gz
opensim-SC-020f38774fbe8e0f53b0cb28ab49b378b9dcd325.tar.bz2
opensim-SC-020f38774fbe8e0f53b0cb28ab49b378b9dcd325.tar.xz
MS SQL migrations converted to the new format
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