1
0

020_RegionStore.sql 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. BEGIN TRANSACTION
  2. CREATE TABLE dbo.Tmp_regionsettings
  3. (
  4. regionUUID uniqueidentifier NOT NULL,
  5. block_terraform bit NOT NULL,
  6. block_fly bit NOT NULL,
  7. allow_damage bit NOT NULL,
  8. restrict_pushing bit NOT NULL,
  9. allow_land_resell bit NOT NULL,
  10. allow_land_join_divide bit NOT NULL,
  11. block_show_in_search bit NOT NULL,
  12. agent_limit int NOT NULL,
  13. object_bonus float(53) NOT NULL,
  14. maturity int NOT NULL,
  15. disable_scripts bit NOT NULL,
  16. disable_collisions bit NOT NULL,
  17. disable_physics bit NOT NULL,
  18. terrain_texture_1 uniqueidentifier NOT NULL,
  19. terrain_texture_2 uniqueidentifier NOT NULL,
  20. terrain_texture_3 uniqueidentifier NOT NULL,
  21. terrain_texture_4 uniqueidentifier NOT NULL,
  22. elevation_1_nw float(53) NOT NULL,
  23. elevation_2_nw float(53) NOT NULL,
  24. elevation_1_ne float(53) NOT NULL,
  25. elevation_2_ne float(53) NOT NULL,
  26. elevation_1_se float(53) NOT NULL,
  27. elevation_2_se float(53) NOT NULL,
  28. elevation_1_sw float(53) NOT NULL,
  29. elevation_2_sw float(53) NOT NULL,
  30. water_height float(53) NOT NULL,
  31. terrain_raise_limit float(53) NOT NULL,
  32. terrain_lower_limit float(53) NOT NULL,
  33. use_estate_sun bit NOT NULL,
  34. fixed_sun bit NOT NULL,
  35. sun_position float(53) NOT NULL,
  36. covenant uniqueidentifier NULL DEFAULT (NULL),
  37. Sandbox bit NOT NULL,
  38. sunvectorx float(53) NOT NULL DEFAULT ((0)),
  39. sunvectory float(53) NOT NULL DEFAULT ((0)),
  40. sunvectorz float(53) NOT NULL DEFAULT ((0))
  41. ) ON [PRIMARY]
  42. IF EXISTS(SELECT * FROM dbo.regionsettings)
  43. 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)
  44. 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)')
  45. DROP TABLE dbo.regionsettings
  46. EXECUTE sp_rename N'dbo.Tmp_regionsettings', N'regionsettings', 'OBJECT'
  47. ALTER TABLE dbo.regionsettings ADD CONSTRAINT
  48. PK__regionse__5B35159D21B6055D PRIMARY KEY CLUSTERED
  49. (
  50. regionUUID
  51. ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  52. COMMIT