From 07609565617aa7936758acba5fd625877564a10d Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Thu, 19 Feb 2009 18:09:10 +0000
Subject: * Apply http://opensimulator.org/mantis/view.php?id=3142 * 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)

---
 OpenSim/Data/MSSQL/Resources/008_EstateStore.sql | 49 ++++++++++++++++++++++++
 1 file changed, 49 insertions(+)
 create mode 100644 OpenSim/Data/MSSQL/Resources/008_EstateStore.sql

(limited to 'OpenSim/Data/MSSQL/Resources/008_EstateStore.sql')

diff --git a/OpenSim/Data/MSSQL/Resources/008_EstateStore.sql b/OpenSim/Data/MSSQL/Resources/008_EstateStore.sql
new file mode 100644
index 0000000..9c5355e
--- /dev/null
+++ b/OpenSim/Data/MSSQL/Resources/008_EstateStore.sql
@@ -0,0 +1,49 @@
+BEGIN TRANSACTION
+
+CREATE TABLE dbo.Tmp_estate_settings
+	(
+	EstateID int NOT NULL IDENTITY (1, 100),
+	EstateName varchar(64) NULL DEFAULT (NULL),
+	AbuseEmailToEstateOwner bit NOT NULL,
+	DenyAnonymous bit NOT NULL,
+	ResetHomeOnTeleport bit NOT NULL,
+	FixedSun bit NOT NULL,
+	DenyTransacted bit NOT NULL,
+	BlockDwell bit NOT NULL,
+	DenyIdentified bit NOT NULL,
+	AllowVoice bit NOT NULL,
+	UseGlobalTime bit NOT NULL,
+	PricePerMeter int NOT NULL,
+	TaxFree bit NOT NULL,
+	AllowDirectTeleport bit NOT NULL,
+	RedirectGridX int NOT NULL,
+	RedirectGridY int NOT NULL,
+	ParentEstateID int NOT NULL,
+	SunPosition float(53) NOT NULL,
+	EstateSkipScripts bit NOT NULL,
+	BillableFactor float(53) NOT NULL,
+	PublicAccess bit NOT NULL,
+	AbuseEmail varchar(255) NOT NULL,
+	EstateOwner uniqueidentifier NOT NULL,
+	DenyMinors bit NOT NULL
+	)  ON [PRIMARY]
+
+SET IDENTITY_INSERT dbo.Tmp_estate_settings ON
+
+IF EXISTS(SELECT * FROM dbo.estate_settings)
+	 EXEC('INSERT INTO dbo.Tmp_estate_settings (EstateID, EstateName, AbuseEmailToEstateOwner, DenyAnonymous, ResetHomeOnTeleport, FixedSun, DenyTransacted, BlockDwell, DenyIdentified, AllowVoice, UseGlobalTime, PricePerMeter, TaxFree, AllowDirectTeleport, RedirectGridX, RedirectGridY, ParentEstateID, SunPosition, EstateSkipScripts, BillableFactor, PublicAccess, AbuseEmail, EstateOwner, DenyMinors)
+		SELECT EstateID, EstateName, AbuseEmailToEstateOwner, DenyAnonymous, ResetHomeOnTeleport, FixedSun, DenyTransacted, BlockDwell, DenyIdentified, AllowVoice, UseGlobalTime, PricePerMeter, TaxFree, AllowDirectTeleport, RedirectGridX, RedirectGridY, ParentEstateID, SunPosition, EstateSkipScripts, BillableFactor, PublicAccess, AbuseEmail, CONVERT(uniqueidentifier, EstateOwner), DenyMinors FROM dbo.estate_settings WITH (HOLDLOCK TABLOCKX)')
+
+SET IDENTITY_INSERT dbo.Tmp_estate_settings OFF
+
+DROP TABLE dbo.estate_settings
+
+EXECUTE sp_rename N'dbo.Tmp_estate_settings', N'estate_settings', 'OBJECT' 
+
+ALTER TABLE dbo.estate_settings ADD CONSTRAINT
+	PK_estate_settings PRIMARY KEY CLUSTERED 
+	(
+	EstateID
+	) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
+
+COMMIT
-- 
cgit v1.1

