1
0

Avatar.migrations 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. :VERSION 1
  2. BEGIN TRANSACTION
  3. CREATE TABLE [Avatars] (
  4. [PrincipalID] uniqueidentifier NOT NULL,
  5. [Name] varchar(32) NOT NULL,
  6. [Value] varchar(255) NOT NULL DEFAULT '',
  7. PRIMARY KEY CLUSTERED
  8. (
  9. [PrincipalID] ASC, [Name] ASC
  10. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  11. ) ON [PRIMARY]
  12. COMMIT
  13. :VERSION 2
  14. BEGIN TRANSACTION
  15. CREATE TABLE dbo.Tmp_Avatars
  16. (
  17. PrincipalID uniqueidentifier NOT NULL,
  18. [Name] varchar(32) NOT NULL,
  19. Value text NOT NULL DEFAULT '',
  20. ) ON [PRIMARY]
  21. TEXTIMAGE_ON [PRIMARY]
  22. IF EXISTS(SELECT * FROM dbo.Avatars)
  23. EXEC('INSERT INTO dbo.Tmp_Avatars (PrincipalID, Name, Value)
  24. SELECT PrincipalID, CONVERT(text, Name), Value FROM dbo.Avatars WITH (HOLDLOCK TABLOCKX)')
  25. DROP TABLE dbo.Avatars
  26. EXECUTE sp_rename N'dbo.Tmp_Avatars', N'Avatars', 'OBJECT'
  27. COMMIT
  28. :VERSION 3
  29. BEGIN TRANSACTION
  30. CREATE TABLE dbo.Tmp_Avatars
  31. (
  32. PrincipalID uniqueidentifier NOT NULL,
  33. [Name] varchar(32) NOT NULL,
  34. Value text NOT NULL DEFAULT '',
  35. PRIMARY KEY CLUSTERED
  36. (
  37. [PrincipalID] ASC, [Name] ASC
  38. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  39. ) ON [PRIMARY]
  40. TEXTIMAGE_ON [PRIMARY]
  41. IF EXISTS(SELECT * FROM dbo.Avatars)
  42. EXEC('INSERT INTO dbo.Tmp_Avatars (PrincipalID, Name, Value)
  43. SELECT PrincipalID, CONVERT(text, Name), Value FROM dbo.Avatars WITH (HOLDLOCK TABLOCKX)')
  44. DROP TABLE dbo.Avatars
  45. EXECUTE sp_rename N'dbo.Tmp_Avatars', N'Avatars', 'OBJECT'
  46. COMMIT