Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

183 lines
5.5 KiB

  1. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[BucketToInt]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
  2. drop table [dbo].[BucketToInt]
  3. GO
  4. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[CommentActions]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
  5. drop table [dbo].[CommentActions]
  6. GO
  7. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[CommentMap]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
  8. drop table [dbo].[CommentMap]
  9. GO
  10. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Comments]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
  11. drop table [dbo].[Comments]
  12. GO
  13. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[CrashInstances]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
  14. drop table [dbo].[CrashInstances]
  15. GO
  16. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DrNames]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
  17. drop table [dbo].[DrNames]
  18. GO
  19. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FollowupGroup]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
  20. drop table [dbo].[FollowupGroup]
  21. GO
  22. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FollowupIds]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
  23. drop table [dbo].[FollowupIds]
  24. GO
  25. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[RaidBugs]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
  26. drop table [dbo].[RaidBugs]
  27. GO
  28. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[TriageQueue]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
  29. drop table [dbo].[TriageQueue]
  30. GO
  31. CREATE TABLE [dbo].[BucketToInt] (
  32. [BucketId] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
  33. [iBucket] [int] IDENTITY (100, 1) NOT NULL ,
  34. [iFollowup] [int] NULL ,
  35. [iDriverName] [int] NULL ,
  36. [PoolCorruption] [bit] NULL ,
  37. [Platform] [int] NULL ,
  38. [MoreData] [bigint] NULL
  39. ) ON [PRIMARY]
  40. GO
  41. CREATE TABLE [dbo].[CommentActions] (
  42. [ActionID] [int] IDENTITY (1, 1) NOT NULL ,
  43. [Action] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
  44. ) ON [PRIMARY]
  45. GO
  46. CREATE TABLE [dbo].[CommentMap] (
  47. [CommentId] [int] NULL ,
  48. [iBucket] [int] NULL
  49. ) ON [PRIMARY]
  50. GO
  51. CREATE TABLE [dbo].[Comments] (
  52. [EntryDate] [datetime] NULL ,
  53. [CommentBy] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
  54. [Action] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
  55. [Comment] [varchar] (1000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
  56. [CommentId] [int] IDENTITY (1, 1) NOT NULL ,
  57. [iBucket] [int] NULL ,
  58. [ActionID] [int] NULL ,
  59. [BucketID] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
  60. ) ON [PRIMARY]
  61. GO
  62. CREATE TABLE [dbo].[CrashInstances] (
  63. [Path] [varchar] (256) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
  64. [BuildNo] [int] NOT NULL ,
  65. [CpuId] [bigint] NOT NULL ,
  66. [IncidentId] [bigint] NOT NULL ,
  67. [sBucket] [int] NOT NULL ,
  68. [gBucket] [int] NOT NULL ,
  69. [EntryDate] [datetime] NOT NULL ,
  70. [Source] [int] NULL
  71. ) ON [PRIMARY]
  72. GO
  73. CREATE TABLE [dbo].[DrNames] (
  74. [DriverName] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
  75. [iDriverName] [int] IDENTITY (1, 1) NOT NULL
  76. ) ON [PRIMARY]
  77. GO
  78. CREATE TABLE [dbo].[FollowupGroup] (
  79. [GroupName] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
  80. [iGroup] [int] IDENTITY (1, 1) NOT NULL
  81. ) ON [PRIMARY]
  82. GO
  83. CREATE TABLE [dbo].[FollowupIds] (
  84. [Followup] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
  85. [iFollowup] [int] IDENTITY (1, 1) NOT NULL ,
  86. [iGroup] [int] NULL
  87. ) ON [PRIMARY]
  88. GO
  89. CREATE TABLE [dbo].[RaidBugs] (
  90. [iBucket] [int] NULL ,
  91. [BugId] [int] NULL ,
  92. [BugIndex] [int] IDENTITY (1, 1) NOT NULL ,
  93. [BucketID] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
  94. [Area] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
  95. ) ON [PRIMARY]
  96. GO
  97. ALTER TABLE [dbo].[BucketToInt] WITH NOCHECK ADD
  98. CONSTRAINT [PK_BucketToInt] PRIMARY KEY CLUSTERED
  99. (
  100. [BucketId]
  101. ) ON [PRIMARY]
  102. GO
  103. ALTER TABLE [dbo].[CrashInstances] WITH NOCHECK ADD
  104. CONSTRAINT [PK_CrashInstances] PRIMARY KEY CLUSTERED
  105. (
  106. [IncidentId]
  107. ) ON [PRIMARY]
  108. GO
  109. ALTER TABLE [dbo].[DrNames] WITH NOCHECK ADD
  110. CONSTRAINT [PK_DrNames] PRIMARY KEY CLUSTERED
  111. (
  112. [DriverName]
  113. ) ON [PRIMARY]
  114. GO
  115. ALTER TABLE [dbo].[FollowupGroup] WITH NOCHECK ADD
  116. PRIMARY KEY CLUSTERED
  117. (
  118. [GroupName]
  119. ) ON [PRIMARY]
  120. GO
  121. ALTER TABLE [dbo].[FollowupIds] WITH NOCHECK ADD
  122. PRIMARY KEY CLUSTERED
  123. (
  124. [Followup]
  125. ) ON [PRIMARY]
  126. GO
  127. ALTER TABLE [dbo].[BucketToInt] WITH NOCHECK ADD
  128. CONSTRAINT [UQ__BucketToInt__0B91BA14] UNIQUE NONCLUSTERED
  129. (
  130. [iBucket]
  131. ) ON [PRIMARY]
  132. GO
  133. ALTER TABLE [dbo].[CrashInstances] WITH NOCHECK ADD
  134. CONSTRAINT [DF__CrashInst__Sourc__19DFD96B] DEFAULT (1) FOR [Source]
  135. GO
  136. CREATE TABLE [dbo].[TriageQueue] (
  137. [RequestID] [int] IDENTITY (1, 1) NOT NULL ,
  138. [Requestor] [char] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
  139. [BucketID] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
  140. [Reason] [varchar] (256) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
  141. [ApprovalDate] [datetime] NULL ,
  142. [Approver] [char] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
  143. [CompleteDate] [datetime] NULL ,
  144. [Tester] [char] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
  145. ) ON [PRIMARY]
  146. GO
  147. ALTER TABLE [dbo].[TriageQueue] WITH NOCHECK ADD
  148. CONSTRAINT [PK_TriageQueue] PRIMARY KEY CLUSTERED
  149. (
  150. [RequestID]
  151. ) ON [PRIMARY]
  152. GO