* 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:
Justin Clarke Casey
2009-02-19 18:09:10 +00:00
parent 06ece33bee
commit 0760956561
30 changed files with 1125 additions and 180 deletions

View 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