001_EstateStore.sql 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. CREATE TABLE EstateSettings (
  2. EstateID INT NOT NULL,
  3. ParentEstateID INT NULL,
  4. EstateOwnerID NVARCHAR(36) NULL,
  5. Name NVARCHAR(64) NULL,
  6. RedirectGridX INT NULL,
  7. RedirectGridY INT NULL,
  8. BillableFactor REAL NULL,
  9. PricePerMeter INT NULL,
  10. SunPosition FLOAT NULL,
  11. UseGlobalTime BIT NULL,
  12. FixedSun BIT NULL,
  13. AllowVoice BIT NULL,
  14. AllowDirectTeleport BIT NULL,
  15. ResetHomeOnTeleport BIT NULL,
  16. PublicAccess BIT NULL,
  17. DenyAnonymous BIT NULL,
  18. DenyIdentified BIT NULL,
  19. DenyTransacted BIT NULL,
  20. DenyMinors BIT NULL,
  21. BlockDwell BIT NULL,
  22. EstateSkipScripts BIT NULL,
  23. TaxFree BIT NULL,
  24. AbuseEmailToEstateOwner BIT NULL,
  25. AbuseEmail NVARCHAR(255) NULL,
  26. PRIMARY KEY (EstateID)
  27. );
  28. CREATE TABLE EstateRegionLink (
  29. EstateRegionLinkID NVARCHAR(36) NOT NULL,
  30. EstateID INT NULL,
  31. RegionID NVARCHAR(36) NULL,
  32. PRIMARY KEY (EstateRegionLinkID)
  33. );
  34. CREATE INDEX EstateRegionLinkEstateIDIndex ON EstateRegionLink (EstateID);
  35. CREATE INDEX EstateRegionLinkERegionIDIndex ON EstateRegionLink (RegionID);
  36. CREATE TABLE EstateManagers (
  37. EstateID INT NOT NULL,
  38. ManagerID NVARCHAR(36) NOT NULL,
  39. ArrayIndex INT NOT NULL,
  40. PRIMARY KEY (EstateID,ArrayIndex)
  41. );
  42. CREATE TABLE EstateUsers (
  43. EstateID INT NOT NULL,
  44. UserID NVARCHAR(36) NOT NULL,
  45. ArrayIndex INT NOT NULL,
  46. PRIMARY KEY (EstateID,ArrayIndex)
  47. );
  48. CREATE TABLE EstateGroups (
  49. EstateID INT NOT NULL,
  50. GroupID NVARCHAR(36) NOT NULL,
  51. ArrayIndex INT NOT NULL,
  52. PRIMARY KEY (EstateID,ArrayIndex)
  53. );
  54. CREATE TABLE EstateBans (
  55. EstateID INT NOT NULL,
  56. ArrayIndex INT NOT NULL,
  57. BannedUserID NVARCHAR(36) NOT NULL,
  58. BannedHostAddress NVARCHAR(16) NOT NULL,
  59. BannedHostIPMask NVARCHAR(16) NOT NULL,
  60. BannedHostNameMask NVARCHAR(16) NOT NULL,
  61. PRIMARY KEY (EstateID,ArrayIndex)
  62. );