1
0

006_RegionStore.sql 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. BEGIN TRANSACTION;
  2. CREATE TABLE estate_groups (
  3. EstateID int(10) NOT NULL,
  4. uuid char(36) NOT NULL
  5. );
  6. CREATE TABLE estate_managers (
  7. EstateID int(10) NOT NULL,
  8. uuid char(36) NOT NULL
  9. );
  10. CREATE TABLE estate_map (
  11. RegionID char(36) NOT NULL default '00000000-0000-0000-0000-000000000000',
  12. EstateID int(11) NOT NULL
  13. );
  14. CREATE TABLE estate_settings (
  15. EstateID INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
  16. EstateName varchar(64) default NULL,
  17. AbuseEmailToEstateOwner tinyint(4) NOT NULL,
  18. DenyAnonymous tinyint(4) NOT NULL,
  19. ResetHomeOnTeleport tinyint(4) NOT NULL,
  20. FixedSun tinyint(4) NOT NULL,
  21. DenyTransacted tinyint(4) NOT NULL,
  22. BlockDwell tinyint(4) NOT NULL,
  23. DenyIdentified tinyint(4) NOT NULL,
  24. AllowVoice tinyint(4) NOT NULL,
  25. UseGlobalTime tinyint(4) NOT NULL,
  26. PricePerMeter int(11) NOT NULL,
  27. TaxFree tinyint(4) NOT NULL,
  28. AllowDirectTeleport tinyint(4) NOT NULL,
  29. RedirectGridX int(11) NOT NULL,
  30. RedirectGridY int(11) NOT NULL,
  31. ParentEstateID int(10) NOT NULL,
  32. SunPosition double NOT NULL,
  33. EstateSkipScripts tinyint(4) NOT NULL,
  34. BillableFactor float NOT NULL,
  35. PublicAccess tinyint(4) NOT NULL
  36. );
  37. insert into estate_settings (EstateID,EstateName,AbuseEmailToEstateOwner,DenyAnonymous,ResetHomeOnTeleport,FixedSun,DenyTransacted,BlockDwell,DenyIdentified,AllowVoice,UseGlobalTime,PricePerMeter,TaxFree,AllowDirectTeleport,RedirectGridX,RedirectGridY,ParentEstateID,SunPosition,PublicAccess,EstateSkipScripts,BillableFactor) values ( 99, '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '');
  38. delete from estate_settings;
  39. CREATE TABLE estate_users (
  40. EstateID int(10) NOT NULL,
  41. uuid char(36) NOT NULL
  42. );
  43. CREATE TABLE estateban (
  44. EstateID int(10) NOT NULL,
  45. bannedUUID varchar(36) NOT NULL,
  46. bannedIp varchar(16) NOT NULL,
  47. bannedIpHostMask varchar(16) NOT NULL,
  48. bannedNameMask varchar(64) default NULL
  49. );
  50. drop table regionsettings;
  51. CREATE TABLE regionsettings (
  52. regionUUID char(36) NOT NULL,
  53. block_terraform int(11) NOT NULL,
  54. block_fly int(11) NOT NULL,
  55. allow_damage int(11) NOT NULL,
  56. restrict_pushing int(11) NOT NULL,
  57. allow_land_resell int(11) NOT NULL,
  58. allow_land_join_divide int(11) NOT NULL,
  59. block_show_in_search int(11) NOT NULL,
  60. agent_limit int(11) NOT NULL,
  61. object_bonus float NOT NULL,
  62. maturity int(11) NOT NULL,
  63. disable_scripts int(11) NOT NULL,
  64. disable_collisions int(11) NOT NULL,
  65. disable_physics int(11) NOT NULL,
  66. terrain_texture_1 char(36) NOT NULL,
  67. terrain_texture_2 char(36) NOT NULL,
  68. terrain_texture_3 char(36) NOT NULL,
  69. terrain_texture_4 char(36) NOT NULL,
  70. elevation_1_nw float NOT NULL,
  71. elevation_2_nw float NOT NULL,
  72. elevation_1_ne float NOT NULL,
  73. elevation_2_ne float NOT NULL,
  74. elevation_1_se float NOT NULL,
  75. elevation_2_se float NOT NULL,
  76. elevation_1_sw float NOT NULL,
  77. elevation_2_sw float NOT NULL,
  78. water_height float NOT NULL,
  79. terrain_raise_limit float NOT NULL,
  80. terrain_lower_limit float NOT NULL,
  81. use_estate_sun int(11) NOT NULL,
  82. fixed_sun int(11) NOT NULL,
  83. sun_position float NOT NULL,
  84. covenant char(36) default NULL,
  85. Sandbox tinyint(4) NOT NULL,
  86. PRIMARY KEY (regionUUID)
  87. );
  88. CREATE INDEX estate_ban_estate_id on estateban(EstateID);
  89. CREATE INDEX estate_groups_estate_id on estate_groups(EstateID);
  90. CREATE INDEX estate_managers_estate_id on estate_managers(EstateID);
  91. CREATE INDEX estate_map_estate_id on estate_map(EstateID);
  92. CREATE UNIQUE INDEX estate_map_region_id on estate_map(RegionID);
  93. CREATE INDEX estate_users_estate_id on estate_users(EstateID);
  94. COMMIT;