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/006_UserStore.sql | |
parent | Migrations for SQLite converted to new format (diff) | |
download | opensim-SC_OLD-020f38774fbe8e0f53b0cb28ab49b378b9dcd325.zip opensim-SC_OLD-020f38774fbe8e0f53b0cb28ab49b378b9dcd325.tar.gz opensim-SC_OLD-020f38774fbe8e0f53b0cb28ab49b378b9dcd325.tar.bz2 opensim-SC_OLD-020f38774fbe8e0f53b0cb28ab49b378b9dcd325.tar.xz |
MS SQL migrations converted to the new format
Diffstat (limited to 'OpenSim/Data/MSSQL/Resources/006_UserStore.sql')
-rw-r--r-- | OpenSim/Data/MSSQL/Resources/006_UserStore.sql | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/OpenSim/Data/MSSQL/Resources/006_UserStore.sql b/OpenSim/Data/MSSQL/Resources/006_UserStore.sql deleted file mode 100644 index 67fe581..0000000 --- a/OpenSim/Data/MSSQL/Resources/006_UserStore.sql +++ /dev/null | |||
@@ -1,57 +0,0 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | CREATE TABLE dbo.Tmp_users | ||
4 | ( | ||
5 | UUID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'), | ||
6 | username varchar(32) NOT NULL, | ||
7 | lastname varchar(32) NOT NULL, | ||
8 | passwordHash varchar(32) NOT NULL, | ||
9 | passwordSalt varchar(32) NOT NULL, | ||
10 | homeRegion bigint NULL DEFAULT (NULL), | ||
11 | homeLocationX float(53) NULL DEFAULT (NULL), | ||
12 | homeLocationY float(53) NULL DEFAULT (NULL), | ||
13 | homeLocationZ float(53) NULL DEFAULT (NULL), | ||
14 | homeLookAtX float(53) NULL DEFAULT (NULL), | ||
15 | homeLookAtY float(53) NULL DEFAULT (NULL), | ||
16 | homeLookAtZ float(53) NULL DEFAULT (NULL), | ||
17 | created int NOT NULL, | ||
18 | lastLogin int NOT NULL, | ||
19 | userInventoryURI varchar(255) NULL DEFAULT (NULL), | ||
20 | userAssetURI varchar(255) NULL DEFAULT (NULL), | ||
21 | profileCanDoMask int NULL DEFAULT (NULL), | ||
22 | profileWantDoMask int NULL DEFAULT (NULL), | ||
23 | profileAboutText ntext NULL, | ||
24 | profileFirstText ntext NULL, | ||
25 | profileImage uniqueidentifier NULL DEFAULT (NULL), | ||
26 | profileFirstImage uniqueidentifier NULL DEFAULT (NULL), | ||
27 | webLoginKey uniqueidentifier NULL DEFAULT (NULL), | ||
28 | homeRegionID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'), | ||
29 | userFlags int NOT NULL DEFAULT ((0)), | ||
30 | godLevel int NOT NULL DEFAULT ((0)), | ||
31 | customType varchar(32) NOT NULL DEFAULT (''), | ||
32 | partner uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'), | ||
33 | email varchar(250) NULL | ||
34 | ) ON [PRIMARY] | ||
35 | TEXTIMAGE_ON [PRIMARY] | ||
36 | |||
37 | IF EXISTS(SELECT * FROM dbo.users) | ||
38 | EXEC('INSERT INTO dbo.Tmp_users (UUID, username, lastname, passwordHash, passwordSalt, homeRegion, homeLocationX, homeLocationY, homeLocationZ, homeLookAtX, homeLookAtY, homeLookAtZ, created, lastLogin, userInventoryURI, userAssetURI, profileCanDoMask, profileWantDoMask, profileAboutText, profileFirstText, profileImage, profileFirstImage, webLoginKey, homeRegionID, userFlags, godLevel, customType, partner, email) | ||
39 | SELECT CONVERT(uniqueidentifier, UUID), username, lastname, passwordHash, passwordSalt, homeRegion, homeLocationX, homeLocationY, homeLocationZ, homeLookAtX, homeLookAtY, homeLookAtZ, created, lastLogin, userInventoryURI, userAssetURI, profileCanDoMask, profileWantDoMask, profileAboutText, profileFirstText, CONVERT(uniqueidentifier, profileImage), CONVERT(uniqueidentifier, profileFirstImage), CONVERT(uniqueidentifier, webLoginKey), CONVERT(uniqueidentifier, homeRegionID), userFlags, godLevel, customType, CONVERT(uniqueidentifier, partner), email FROM dbo.users WITH (HOLDLOCK TABLOCKX)') | ||
40 | |||
41 | DROP TABLE dbo.users | ||
42 | |||
43 | EXECUTE sp_rename N'dbo.Tmp_users', N'users', 'OBJECT' | ||
44 | |||
45 | ALTER TABLE dbo.users ADD CONSTRAINT | ||
46 | PK__users__65A475E737A5467C PRIMARY KEY CLUSTERED | ||
47 | ( | ||
48 | UUID | ||
49 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
50 | |||
51 | CREATE NONCLUSTERED INDEX usernames ON dbo.users | ||
52 | ( | ||
53 | username, | ||
54 | lastname | ||
55 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
56 | |||
57 | COMMIT | ||