diff options
author | AlexRa | 2010-05-06 23:16:36 +0300 |
---|---|---|
committer | AlexRa | 2010-05-18 22:16:13 +0300 |
commit | 020f38774fbe8e0f53b0cb28ab49b378b9dcd325 (patch) | |
tree | 5d936d6450d580cf24e133047df7ff8d759de557 /OpenSim/Data/MSSQL/Resources/UserAccount.migrations | |
parent | Migrations for SQLite converted to new format (diff) | |
download | opensim-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.migrations | 55 |
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 | |||
3 | CREATE 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 | |||
21 | BEGIN TRANSACTION | ||
22 | |||
23 | INSERT INTO UserAccounts (PrincipalID, ScopeID, FirstName, LastName, Email, ServiceURLs, Created) SELECT [UUID] AS PrincipalID, '00000000-0000-0000-0000-000000000000' AS ScopeID, | ||
24 | username AS FirstName, | ||
25 | lastname AS LastName, | ||
26 | email as Email, ( | ||
27 | 'AssetServerURI=' + | ||
28 | userAssetURI + ' InventoryServerURI=' + userInventoryURI + ' GatewayURI= HomeURI=') AS ServiceURLs, | ||
29 | created as Created FROM users; | ||
30 | |||
31 | |||
32 | COMMIT | ||
33 | |||
34 | :VERSION 3 | ||
35 | |||
36 | BEGIN TRANSACTION | ||
37 | |||
38 | CREATE UNIQUE INDEX PrincipalID ON UserAccounts(PrincipalID); | ||
39 | CREATE INDEX Email ON UserAccounts(Email); | ||
40 | CREATE INDEX FirstName ON UserAccounts(FirstName); | ||
41 | CREATE INDEX LastName ON UserAccounts(LastName); | ||
42 | CREATE INDEX Name ON UserAccounts(FirstName,LastName); | ||
43 | |||
44 | COMMIT | ||
45 | |||
46 | :VERSION 4 | ||
47 | |||
48 | BEGIN TRANSACTION | ||
49 | |||
50 | ALTER TABLE UserAccounts ADD UserLevel integer NOT NULL DEFAULT 0; | ||
51 | ALTER TABLE UserAccounts ADD UserFlags integer NOT NULL DEFAULT 0; | ||
52 | ALTER TABLE UserAccounts ADD UserTitle varchar(64) NOT NULL DEFAULT ''; | ||
53 | |||
54 | COMMIT | ||
55 | |||