008_EstateStore.sql 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. BEGIN TRANSACTION
  2. CREATE TABLE dbo.Tmp_estate_settings
  3. (
  4. EstateID int NOT NULL IDENTITY (1, 100),
  5. EstateName varchar(64) NULL DEFAULT (NULL),
  6. AbuseEmailToEstateOwner bit NOT NULL,
  7. DenyAnonymous bit NOT NULL,
  8. ResetHomeOnTeleport bit NOT NULL,
  9. FixedSun bit NOT NULL,
  10. DenyTransacted bit NOT NULL,
  11. BlockDwell bit NOT NULL,
  12. DenyIdentified bit NOT NULL,
  13. AllowVoice bit NOT NULL,
  14. UseGlobalTime bit NOT NULL,
  15. PricePerMeter int NOT NULL,
  16. TaxFree bit NOT NULL,
  17. AllowDirectTeleport bit NOT NULL,
  18. RedirectGridX int NOT NULL,
  19. RedirectGridY int NOT NULL,
  20. ParentEstateID int NOT NULL,
  21. SunPosition float(53) NOT NULL,
  22. EstateSkipScripts bit NOT NULL,
  23. BillableFactor float(53) NOT NULL,
  24. PublicAccess bit NOT NULL,
  25. AbuseEmail varchar(255) NOT NULL,
  26. EstateOwner uniqueidentifier NOT NULL,
  27. DenyMinors bit NOT NULL
  28. ) ON [PRIMARY]
  29. SET IDENTITY_INSERT dbo.Tmp_estate_settings ON
  30. IF EXISTS(SELECT * FROM dbo.estate_settings)
  31. 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)
  32. 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)')
  33. SET IDENTITY_INSERT dbo.Tmp_estate_settings OFF
  34. DROP TABLE dbo.estate_settings
  35. EXECUTE sp_rename N'dbo.Tmp_estate_settings', N'estate_settings', 'OBJECT'
  36. ALTER TABLE dbo.estate_settings ADD CONSTRAINT
  37. PK_estate_settings PRIMARY KEY CLUSTERED
  38. (
  39. EstateID
  40. ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  41. COMMIT