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/020_RegionStore.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/020_RegionStore.sql')
-rw-r--r-- | OpenSim/Data/MSSQL/Resources/020_RegionStore.sql | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/OpenSim/Data/MSSQL/Resources/020_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/020_RegionStore.sql new file mode 100644 index 0000000..2ce91f6 --- /dev/null +++ b/OpenSim/Data/MSSQL/Resources/020_RegionStore.sql | |||
@@ -0,0 +1,58 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | CREATE TABLE dbo.Tmp_regionsettings | ||
4 | ( | ||
5 | regionUUID uniqueidentifier NOT NULL, | ||
6 | block_terraform bit NOT NULL, | ||
7 | block_fly bit NOT NULL, | ||
8 | allow_damage bit NOT NULL, | ||
9 | restrict_pushing bit NOT NULL, | ||
10 | allow_land_resell bit NOT NULL, | ||
11 | allow_land_join_divide bit NOT NULL, | ||
12 | block_show_in_search bit NOT NULL, | ||
13 | agent_limit int NOT NULL, | ||
14 | object_bonus float(53) NOT NULL, | ||
15 | maturity int NOT NULL, | ||
16 | disable_scripts bit NOT NULL, | ||
17 | disable_collisions bit NOT NULL, | ||
18 | disable_physics bit NOT NULL, | ||
19 | terrain_texture_1 uniqueidentifier NOT NULL, | ||
20 | terrain_texture_2 uniqueidentifier NOT NULL, | ||
21 | terrain_texture_3 uniqueidentifier NOT NULL, | ||
22 | terrain_texture_4 uniqueidentifier NOT NULL, | ||
23 | elevation_1_nw float(53) NOT NULL, | ||
24 | elevation_2_nw float(53) NOT NULL, | ||
25 | elevation_1_ne float(53) NOT NULL, | ||
26 | elevation_2_ne float(53) NOT NULL, | ||
27 | elevation_1_se float(53) NOT NULL, | ||
28 | elevation_2_se float(53) NOT NULL, | ||
29 | elevation_1_sw float(53) NOT NULL, | ||
30 | elevation_2_sw float(53) NOT NULL, | ||
31 | water_height float(53) NOT NULL, | ||
32 | terrain_raise_limit float(53) NOT NULL, | ||
33 | terrain_lower_limit float(53) NOT NULL, | ||
34 | use_estate_sun bit NOT NULL, | ||
35 | fixed_sun bit NOT NULL, | ||
36 | sun_position float(53) NOT NULL, | ||
37 | covenant uniqueidentifier NULL DEFAULT (NULL), | ||
38 | Sandbox bit NOT NULL, | ||
39 | sunvectorx float(53) NOT NULL DEFAULT ((0)), | ||
40 | sunvectory float(53) NOT NULL DEFAULT ((0)), | ||
41 | sunvectorz float(53) NOT NULL DEFAULT ((0)) | ||
42 | ) ON [PRIMARY] | ||
43 | |||
44 | IF EXISTS(SELECT * FROM dbo.regionsettings) | ||
45 | EXEC('INSERT INTO dbo.Tmp_regionsettings (regionUUID, block_terraform, block_fly, allow_damage, restrict_pushing, allow_land_resell, allow_land_join_divide, block_show_in_search, agent_limit, object_bonus, maturity, disable_scripts, disable_collisions, disable_physics, terrain_texture_1, terrain_texture_2, terrain_texture_3, terrain_texture_4, elevation_1_nw, elevation_2_nw, elevation_1_ne, elevation_2_ne, elevation_1_se, elevation_2_se, elevation_1_sw, elevation_2_sw, water_height, terrain_raise_limit, terrain_lower_limit, use_estate_sun, fixed_sun, sun_position, covenant, Sandbox, sunvectorx, sunvectory, sunvectorz) | ||
46 | SELECT CONVERT(uniqueidentifier, regionUUID), block_terraform, block_fly, allow_damage, restrict_pushing, allow_land_resell, allow_land_join_divide, block_show_in_search, agent_limit, object_bonus, maturity, disable_scripts, disable_collisions, disable_physics, CONVERT(uniqueidentifier, terrain_texture_1), CONVERT(uniqueidentifier, terrain_texture_2), CONVERT(uniqueidentifier, terrain_texture_3), CONVERT(uniqueidentifier, terrain_texture_4), elevation_1_nw, elevation_2_nw, elevation_1_ne, elevation_2_ne, elevation_1_se, elevation_2_se, elevation_1_sw, elevation_2_sw, water_height, terrain_raise_limit, terrain_lower_limit, use_estate_sun, fixed_sun, sun_position, CONVERT(uniqueidentifier, covenant), Sandbox, sunvectorx, sunvectory, sunvectorz FROM dbo.regionsettings WITH (HOLDLOCK TABLOCKX)') | ||
47 | |||
48 | DROP TABLE dbo.regionsettings | ||
49 | |||
50 | EXECUTE sp_rename N'dbo.Tmp_regionsettings', N'regionsettings', 'OBJECT' | ||
51 | |||
52 | ALTER TABLE dbo.regionsettings ADD CONSTRAINT | ||
53 | PK__regionse__5B35159D21B6055D PRIMARY KEY CLUSTERED | ||
54 | ( | ||
55 | regionUUID | ||
56 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
57 | |||
58 | COMMIT | ||