diff options
Diffstat (limited to 'OpenSim/Data/MSSQL/Resources/GridUserStore.migrations')
-rw-r--r-- | OpenSim/Data/MSSQL/Resources/GridUserStore.migrations | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/OpenSim/Data/MSSQL/Resources/GridUserStore.migrations b/OpenSim/Data/MSSQL/Resources/GridUserStore.migrations index 7a7cecd..ecd3f4d 100644 --- a/OpenSim/Data/MSSQL/Resources/GridUserStore.migrations +++ b/OpenSim/Data/MSSQL/Resources/GridUserStore.migrations | |||
@@ -17,3 +17,49 @@ CREATE TABLE "GridUser" ( | |||
17 | ) | 17 | ) |
18 | 18 | ||
19 | COMMIT | 19 | COMMIT |
20 | |||
21 | :VERSION 2 # -------------------------- | ||
22 | |||
23 | BEGIN TRANSACTION | ||
24 | |||
25 | CREATE TABLE [GridUser_tmp] ( | ||
26 | [UserID] VARCHAR(255) NOT NULL, | ||
27 | [HomeRegionID] uniqueidentifier NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', | ||
28 | [HomePosition] CHAR(64) NOT NULL DEFAULT '<0,0,0>', | ||
29 | [HomeLookAt] CHAR(64) NOT NULL DEFAULT '<0,0,0>', | ||
30 | [LastRegionID] uniqueidentifier NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', | ||
31 | [LastPosition] CHAR(64) NOT NULL DEFAULT '<0,0,0>', | ||
32 | [LastLookAt] CHAR(64) NOT NULL DEFAULT '<0,0,0>', | ||
33 | [Online] CHAR(5) NOT NULL DEFAULT 'false', | ||
34 | [Login] CHAR(16) NOT NULL DEFAULT '0', | ||
35 | [Logout] CHAR(16) NOT NULL DEFAULT '0', | ||
36 | |||
37 | PRIMARY KEY CLUSTERED | ||
38 | ( | ||
39 | [UserID] ASC | ||
40 | )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
41 | ) ON [PRIMARY] | ||
42 | |||
43 | COMMIT | ||
44 | |||
45 | IF EXISTS(SELECT * FROM dbo.GridUser) | ||
46 | EXEC('INSERT INTO dbo.GridUser_tmp ([UserID] | ||
47 | ,[HomeRegionID] | ||
48 | ,[HomePosition] | ||
49 | ,[HomeLookAt] | ||
50 | ,[LastRegionID] | ||
51 | ,[LastPosition] | ||
52 | ,[LastLookAt] | ||
53 | ,[Online] | ||
54 | ,[Login] | ||
55 | ,[Logout]) | ||
56 | SELECT CONVERT(varchar(36), [HomeRegionID]), [HomePosition] ,[HomeLookAt] , CONVERT(varchar(36),[LastRegionID]) | ||
57 | ,[LastPosition] | ||
58 | ,[LastLookAt] | ||
59 | ,[Online] | ||
60 | ,[Login] | ||
61 | ,[Logout] FROM dbo.GridUser WITH (HOLDLOCK TABLOCKX)') | ||
62 | |||
63 | DROP TABLE dbo.GridUser | ||
64 | |||
65 | EXECUTE sp_rename N'dbo.GridUser_tmp', N'GridUser', 'OBJECT' \ No newline at end of file | ||