1
0

009_UserStore.sql 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. BEGIN TRANSACTION
  2. CREATE TABLE dbo.Tmp_avatarappearance
  3. (
  4. Owner uniqueidentifier NOT NULL,
  5. Serial int NOT NULL,
  6. Visual_Params image NOT NULL,
  7. Texture image NOT NULL,
  8. Avatar_Height float(53) NOT NULL,
  9. Body_Item uniqueidentifier NOT NULL,
  10. Body_Asset uniqueidentifier NOT NULL,
  11. Skin_Item uniqueidentifier NOT NULL,
  12. Skin_Asset uniqueidentifier NOT NULL,
  13. Hair_Item uniqueidentifier NOT NULL,
  14. Hair_Asset uniqueidentifier NOT NULL,
  15. Eyes_Item uniqueidentifier NOT NULL,
  16. Eyes_Asset uniqueidentifier NOT NULL,
  17. Shirt_Item uniqueidentifier NOT NULL,
  18. Shirt_Asset uniqueidentifier NOT NULL,
  19. Pants_Item uniqueidentifier NOT NULL,
  20. Pants_Asset uniqueidentifier NOT NULL,
  21. Shoes_Item uniqueidentifier NOT NULL,
  22. Shoes_Asset uniqueidentifier NOT NULL,
  23. Socks_Item uniqueidentifier NOT NULL,
  24. Socks_Asset uniqueidentifier NOT NULL,
  25. Jacket_Item uniqueidentifier NOT NULL,
  26. Jacket_Asset uniqueidentifier NOT NULL,
  27. Gloves_Item uniqueidentifier NOT NULL,
  28. Gloves_Asset uniqueidentifier NOT NULL,
  29. Undershirt_Item uniqueidentifier NOT NULL,
  30. Undershirt_Asset uniqueidentifier NOT NULL,
  31. Underpants_Item uniqueidentifier NOT NULL,
  32. Underpants_Asset uniqueidentifier NOT NULL,
  33. Skirt_Item uniqueidentifier NOT NULL,
  34. Skirt_Asset uniqueidentifier NOT NULL
  35. ) ON [PRIMARY]
  36. TEXTIMAGE_ON [PRIMARY]
  37. IF EXISTS(SELECT * FROM dbo.avatarappearance)
  38. EXEC('INSERT INTO dbo.Tmp_avatarappearance (Owner, Serial, Visual_Params, Texture, Avatar_Height, Body_Item, Body_Asset, Skin_Item, Skin_Asset, Hair_Item, Hair_Asset, Eyes_Item, Eyes_Asset, Shirt_Item, Shirt_Asset, Pants_Item, Pants_Asset, Shoes_Item, Shoes_Asset, Socks_Item, Socks_Asset, Jacket_Item, Jacket_Asset, Gloves_Item, Gloves_Asset, Undershirt_Item, Undershirt_Asset, Underpants_Item, Underpants_Asset, Skirt_Item, Skirt_Asset)
  39. SELECT CONVERT(uniqueidentifier, Owner), Serial, Visual_Params, Texture, Avatar_Height, CONVERT(uniqueidentifier, Body_Item), CONVERT(uniqueidentifier, Body_Asset), CONVERT(uniqueidentifier, Skin_Item), CONVERT(uniqueidentifier, Skin_Asset), CONVERT(uniqueidentifier, Hair_Item), CONVERT(uniqueidentifier, Hair_Asset), CONVERT(uniqueidentifier, Eyes_Item), CONVERT(uniqueidentifier, Eyes_Asset), CONVERT(uniqueidentifier, Shirt_Item), CONVERT(uniqueidentifier, Shirt_Asset), CONVERT(uniqueidentifier, Pants_Item), CONVERT(uniqueidentifier, Pants_Asset), CONVERT(uniqueidentifier, Shoes_Item), CONVERT(uniqueidentifier, Shoes_Asset), CONVERT(uniqueidentifier, Socks_Item), CONVERT(uniqueidentifier, Socks_Asset), CONVERT(uniqueidentifier, Jacket_Item), CONVERT(uniqueidentifier, Jacket_Asset), CONVERT(uniqueidentifier, Gloves_Item), CONVERT(uniqueidentifier, Gloves_Asset), CONVERT(uniqueidentifier, Undershirt_Item), CONVERT(uniqueidentifier, Undershirt_Asset), CONVERT(uniqueidentifier, Underpants_Item), CONVERT(uniqueidentifier, Underpants_Asset), CONVERT(uniqueidentifier, Skirt_Item), CONVERT(uniqueidentifier, Skirt_Asset) FROM dbo.avatarappearance WITH (HOLDLOCK TABLOCKX)')
  40. DROP TABLE dbo.avatarappearance
  41. EXECUTE sp_rename N'dbo.Tmp_avatarappearance', N'avatarappearance', 'OBJECT'
  42. ALTER TABLE dbo.avatarappearance ADD CONSTRAINT
  43. PK__avatarap__7DD115CC4E88ABD4 PRIMARY KEY CLUSTERED
  44. (
  45. Owner
  46. ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  47. COMMIT