diff options
author | Justin Clarke Casey | 2009-02-19 18:09:10 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2009-02-19 18:09:10 +0000 |
commit | 07609565617aa7936758acba5fd625877564a10d (patch) | |
tree | 73123e37f14fea5f171cbe04753c21758f25afc1 /OpenSim/Data/MSSQL/Resources/008_EstateStore.sql | |
parent | * Okay, so finally got my head around this. Problem is that upstream Prebuild... (diff) | |
download | opensim-SC-07609565617aa7936758acba5fd625877564a10d.zip opensim-SC-07609565617aa7936758acba5fd625877564a10d.tar.gz opensim-SC-07609565617aa7936758acba5fd625877564a10d.tar.bz2 opensim-SC-07609565617aa7936758acba5fd625877564a10d.tar.xz |
* 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)
Diffstat (limited to 'OpenSim/Data/MSSQL/Resources/008_EstateStore.sql')
-rw-r--r-- | OpenSim/Data/MSSQL/Resources/008_EstateStore.sql | 49 |
1 files changed, 49 insertions, 0 deletions
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 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | CREATE TABLE dbo.Tmp_estate_settings | ||
4 | ( | ||
5 | EstateID int NOT NULL IDENTITY (1, 100), | ||
6 | EstateName varchar(64) NULL DEFAULT (NULL), | ||
7 | AbuseEmailToEstateOwner bit NOT NULL, | ||
8 | DenyAnonymous bit NOT NULL, | ||
9 | ResetHomeOnTeleport bit NOT NULL, | ||
10 | FixedSun bit NOT NULL, | ||
11 | DenyTransacted bit NOT NULL, | ||
12 | BlockDwell bit NOT NULL, | ||
13 | DenyIdentified bit NOT NULL, | ||
14 | AllowVoice bit NOT NULL, | ||
15 | UseGlobalTime bit NOT NULL, | ||
16 | PricePerMeter int NOT NULL, | ||
17 | TaxFree bit NOT NULL, | ||
18 | AllowDirectTeleport bit NOT NULL, | ||
19 | RedirectGridX int NOT NULL, | ||
20 | RedirectGridY int NOT NULL, | ||
21 | ParentEstateID int NOT NULL, | ||
22 | SunPosition float(53) NOT NULL, | ||
23 | EstateSkipScripts bit NOT NULL, | ||
24 | BillableFactor float(53) NOT NULL, | ||
25 | PublicAccess bit NOT NULL, | ||
26 | AbuseEmail varchar(255) NOT NULL, | ||
27 | EstateOwner uniqueidentifier NOT NULL, | ||
28 | DenyMinors bit NOT NULL | ||
29 | ) ON [PRIMARY] | ||
30 | |||
31 | SET IDENTITY_INSERT dbo.Tmp_estate_settings ON | ||
32 | |||
33 | IF EXISTS(SELECT * FROM dbo.estate_settings) | ||
34 | 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) | ||
35 | 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)') | ||
36 | |||
37 | SET IDENTITY_INSERT dbo.Tmp_estate_settings OFF | ||
38 | |||
39 | DROP TABLE dbo.estate_settings | ||
40 | |||
41 | EXECUTE sp_rename N'dbo.Tmp_estate_settings', N'estate_settings', 'OBJECT' | ||
42 | |||
43 | ALTER TABLE dbo.estate_settings ADD CONSTRAINT | ||
44 | PK_estate_settings PRIMARY KEY CLUSTERED | ||
45 | ( | ||
46 | EstateID | ||
47 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
48 | |||
49 | COMMIT | ||