mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 17:05:55 +08:00
* Changes varchar(36) columns to UUID type in MSSQL - this will be much more efficient * ===As always, please, please backup your database before applying this patch=== * Thanks Ruud Lathrop (for the patch) and StrawberryFride (for the review)
This commit is contained in:
18
OpenSim/Data/MSSQL/Resources/018_RegionStore.sql
Normal file
18
OpenSim/Data/MSSQL/Resources/018_RegionStore.sql
Normal file
@@ -0,0 +1,18 @@
|
||||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE dbo.Tmp_landaccesslist
|
||||
(
|
||||
LandUUID uniqueidentifier NULL,
|
||||
AccessUUID uniqueidentifier NULL,
|
||||
Flags int NULL
|
||||
) ON [PRIMARY]
|
||||
|
||||
IF EXISTS(SELECT * FROM dbo.landaccesslist)
|
||||
EXEC('INSERT INTO dbo.Tmp_landaccesslist (LandUUID, AccessUUID, Flags)
|
||||
SELECT CONVERT(uniqueidentifier, LandUUID), CONVERT(uniqueidentifier, AccessUUID), Flags FROM dbo.landaccesslist WITH (HOLDLOCK TABLOCKX)')
|
||||
|
||||
DROP TABLE dbo.landaccesslist
|
||||
|
||||
EXECUTE sp_rename N'dbo.Tmp_landaccesslist', N'landaccesslist', 'OBJECT'
|
||||
|
||||
COMMIT
|
||||
Reference in New Issue
Block a user