mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 08:55:56 +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:
19
OpenSim/Data/MSSQL/Resources/019_RegionStore.sql
Normal file
19
OpenSim/Data/MSSQL/Resources/019_RegionStore.sql
Normal file
@@ -0,0 +1,19 @@
|
||||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE dbo.Tmp_regionban
|
||||
(
|
||||
regionUUID uniqueidentifier NOT NULL,
|
||||
bannedUUID uniqueidentifier NOT NULL,
|
||||
bannedIp varchar(16) NOT NULL,
|
||||
bannedIpHostMask varchar(16) NOT NULL
|
||||
) ON [PRIMARY]
|
||||
|
||||
IF EXISTS(SELECT * FROM dbo.regionban)
|
||||
EXEC('INSERT INTO dbo.Tmp_regionban (regionUUID, bannedUUID, bannedIp, bannedIpHostMask)
|
||||
SELECT CONVERT(uniqueidentifier, regionUUID), CONVERT(uniqueidentifier, bannedUUID), bannedIp, bannedIpHostMask FROM dbo.regionban WITH (HOLDLOCK TABLOCKX)')
|
||||
|
||||
DROP TABLE dbo.regionban
|
||||
|
||||
EXECUTE sp_rename N'dbo.Tmp_regionban', N'regionban', 'OBJECT'
|
||||
|
||||
COMMIT
|
||||
Reference in New Issue
Block a user