017_RegionStore.sql 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. BEGIN TRANSACTION
  2. CREATE TABLE dbo.Tmp_land
  3. (
  4. UUID uniqueidentifier NOT NULL,
  5. RegionUUID uniqueidentifier NULL,
  6. LocalLandID int NULL,
  7. Bitmap image NULL,
  8. Name varchar(255) NULL,
  9. Description varchar(255) NULL,
  10. OwnerUUID uniqueidentifier NULL,
  11. IsGroupOwned int NULL,
  12. Area int NULL,
  13. AuctionID int NULL,
  14. Category int NULL,
  15. ClaimDate int NULL,
  16. ClaimPrice int NULL,
  17. GroupUUID uniqueidentifier NULL,
  18. SalePrice int NULL,
  19. LandStatus int NULL,
  20. LandFlags int NULL,
  21. LandingType int NULL,
  22. MediaAutoScale int NULL,
  23. MediaTextureUUID uniqueidentifier NULL,
  24. MediaURL varchar(255) NULL,
  25. MusicURL varchar(255) NULL,
  26. PassHours float(53) NULL,
  27. PassPrice int NULL,
  28. SnapshotUUID uniqueidentifier NULL,
  29. UserLocationX float(53) NULL,
  30. UserLocationY float(53) NULL,
  31. UserLocationZ float(53) NULL,
  32. UserLookAtX float(53) NULL,
  33. UserLookAtY float(53) NULL,
  34. UserLookAtZ float(53) NULL,
  35. AuthbuyerID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'),
  36. OtherCleanTime int NOT NULL DEFAULT ((0)),
  37. Dwell int NOT NULL DEFAULT ((0))
  38. ) ON [PRIMARY]
  39. TEXTIMAGE_ON [PRIMARY]
  40. IF EXISTS(SELECT * FROM dbo.land)
  41. EXEC('INSERT INTO dbo.Tmp_land (UUID, RegionUUID, LocalLandID, Bitmap, Name, Description, OwnerUUID, IsGroupOwned, Area, AuctionID, Category, ClaimDate, ClaimPrice, GroupUUID, SalePrice, LandStatus, LandFlags, LandingType, MediaAutoScale, MediaTextureUUID, MediaURL, MusicURL, PassHours, PassPrice, SnapshotUUID, UserLocationX, UserLocationY, UserLocationZ, UserLookAtX, UserLookAtY, UserLookAtZ, AuthbuyerID, OtherCleanTime, Dwell)
  42. SELECT CONVERT(uniqueidentifier, UUID), CONVERT(uniqueidentifier, RegionUUID), LocalLandID, Bitmap, Name, Description, CONVERT(uniqueidentifier, OwnerUUID), IsGroupOwned, Area, AuctionID, Category, ClaimDate, ClaimPrice, CONVERT(uniqueidentifier, GroupUUID), SalePrice, LandStatus, LandFlags, LandingType, MediaAutoScale, CONVERT(uniqueidentifier, MediaTextureUUID), MediaURL, MusicURL, PassHours, PassPrice, CONVERT(uniqueidentifier, SnapshotUUID), UserLocationX, UserLocationY, UserLocationZ, UserLookAtX, UserLookAtY, UserLookAtZ, CONVERT(uniqueidentifier, AuthbuyerID), OtherCleanTime, Dwell FROM dbo.land WITH (HOLDLOCK TABLOCKX)')
  43. DROP TABLE dbo.land
  44. EXECUTE sp_rename N'dbo.Tmp_land', N'land', 'OBJECT'
  45. ALTER TABLE dbo.land ADD CONSTRAINT
  46. PK__land__65A475E71BFD2C07 PRIMARY KEY CLUSTERED
  47. (
  48. UUID
  49. ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  50. COMMIT