003_RegionStore.sql 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. BEGIN TRANSACTION
  2. CREATE TABLE dbo.Tmp_prims
  3. (
  4. UUID varchar(36) NOT NULL,
  5. RegionUUID varchar(36) NULL,
  6. ParentID int NULL,
  7. CreationDate int NULL,
  8. Name varchar(255) NULL,
  9. SceneGroupID varchar(36) NULL,
  10. Text varchar(255) NULL,
  11. Description varchar(255) NULL,
  12. SitName varchar(255) NULL,
  13. TouchName varchar(255) NULL,
  14. ObjectFlags int NULL,
  15. CreatorID varchar(36) NULL,
  16. OwnerID varchar(36) NULL,
  17. GroupID varchar(36) NULL,
  18. LastOwnerID varchar(36) NULL,
  19. OwnerMask int NULL,
  20. NextOwnerMask int NULL,
  21. GroupMask int NULL,
  22. EveryoneMask int NULL,
  23. BaseMask int NULL,
  24. PositionX float(53) NULL,
  25. PositionY float(53) NULL,
  26. PositionZ float(53) NULL,
  27. GroupPositionX float(53) NULL,
  28. GroupPositionY float(53) NULL,
  29. GroupPositionZ float(53) NULL,
  30. VelocityX float(53) NULL,
  31. VelocityY float(53) NULL,
  32. VelocityZ float(53) NULL,
  33. AngularVelocityX float(53) NULL,
  34. AngularVelocityY float(53) NULL,
  35. AngularVelocityZ float(53) NULL,
  36. AccelerationX float(53) NULL,
  37. AccelerationY float(53) NULL,
  38. AccelerationZ float(53) NULL,
  39. RotationX float(53) NULL,
  40. RotationY float(53) NULL,
  41. RotationZ float(53) NULL,
  42. RotationW float(53) NULL,
  43. SitTargetOffsetX float(53) NULL,
  44. SitTargetOffsetY float(53) NULL,
  45. SitTargetOffsetZ float(53) NULL,
  46. SitTargetOrientW float(53) NULL,
  47. SitTargetOrientX float(53) NULL,
  48. SitTargetOrientY float(53) NULL,
  49. SitTargetOrientZ float(53) NULL
  50. ) ON [PRIMARY]
  51. IF EXISTS(SELECT * FROM dbo.prims)
  52. EXEC('INSERT INTO dbo.Tmp_prims (UUID, RegionUUID, ParentID, CreationDate, Name, SceneGroupID, Text, Description, SitName, TouchName, ObjectFlags, CreatorID, OwnerID, GroupID, LastOwnerID, OwnerMask, NextOwnerMask, GroupMask, EveryoneMask, BaseMask, PositionX, PositionY, PositionZ, GroupPositionX, GroupPositionY, GroupPositionZ, VelocityX, VelocityY, VelocityZ, AngularVelocityX, AngularVelocityY, AngularVelocityZ, AccelerationX, AccelerationY, AccelerationZ, RotationX, RotationY, RotationZ, RotationW, SitTargetOffsetX, SitTargetOffsetY, SitTargetOffsetZ, SitTargetOrientW, SitTargetOrientX, SitTargetOrientY, SitTargetOrientZ)
  53. SELECT CONVERT(varchar(36), UUID), CONVERT(varchar(36), RegionUUID), ParentID, CreationDate, Name, CONVERT(varchar(36), SceneGroupID), Text, Description, SitName, TouchName, ObjectFlags, CONVERT(varchar(36), CreatorID), CONVERT(varchar(36), OwnerID), CONVERT(varchar(36), GroupID), CONVERT(varchar(36), LastOwnerID), OwnerMask, NextOwnerMask, GroupMask, EveryoneMask, BaseMask, PositionX, PositionY, PositionZ, GroupPositionX, GroupPositionY, GroupPositionZ, VelocityX, VelocityY, VelocityZ, AngularVelocityX, AngularVelocityY, AngularVelocityZ, AccelerationX, AccelerationY, AccelerationZ, RotationX, RotationY, RotationZ, RotationW, SitTargetOffsetX, SitTargetOffsetY, SitTargetOffsetZ, SitTargetOrientW, SitTargetOrientX, SitTargetOrientY, SitTargetOrientZ FROM dbo.prims WITH (HOLDLOCK TABLOCKX)')
  54. DROP TABLE dbo.prims
  55. EXECUTE sp_rename N'dbo.Tmp_prims', N'prims', 'OBJECT'
  56. ALTER TABLE dbo.prims ADD CONSTRAINT
  57. PK__prims__10566F31 PRIMARY KEY CLUSTERED
  58. (
  59. UUID
  60. ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  61. COMMIT