您目前尚未登陆,请选择【登陆】或【注册
首页->博客论坛->LiveBlog v1.0测试版源码>>LiveBlog.Web/App-Data/MSSQL2000Setup1.3.1.0.sql>>源码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:LiveBlog v1.0测试版源码
当前文件:文件类型 LiveBlog/LiveBlog.Web/App_Data/MSSQL2000Setup1.3.1.0.sql打开代码结构图
普通视图
		            
1/****** BlogEngine.NET 1.3 SQL Setup Script ******/ 2 3/****** Table [dbo].[be_Categories] ******/ 4SET ANSI_NULLS ON 5GO 6SET QUOTED_IDENTIFIER ON 7GO 8CREATE TABLE [dbo].[be_Categories]( 9 [CategoryID] [uniqueidentifier] ROWGUIDCOL NOT NULL CONSTRAINT [DF_be_Categories_CategoryID] DEFAULT (newid()), 10 [CategoryName] [nvarchar](50) NULL, 11 [Description] [nvarchar](200) NULL, 12 CONSTRAINT [PK_be_Categories] PRIMARY KEY CLUSTERED 13( 14 [CategoryID] ASC 15) ON [PRIMARY] 16) ON [PRIMARY] 17GO 18 19/****** Table [dbo].[be_Pages] ******/ 20SET ANSI_NULLS ON 21GO 22SET QUOTED_IDENTIFIER ON 23GO 24CREATE TABLE [dbo].[be_Pages]( 25 [PageID] [uniqueidentifier] ROWGUIDCOL NOT NULL CONSTRAINT [DF_be_Pages_PageID] DEFAULT (newid()), 26 [Title] [nvarchar](255) NULL, 27 [Description] [ntext] NULL, 28 [PageContent] [ntext] NULL, 29 [Keywords] [ntext] NULL, 30 [DateCreated] [datetime] NULL, 31 [DateModified] [datetime] NULL, 32 [IsPublished] [bit] NULL, 33 [IsFrontPage] [bit] NULL, 34 [Parent] [uniqueidentifier] NULL, 35 [ShowInList] [bit] NULL, 36 [Slug] [nvarchar](255) NULL, 37 CONSTRAINT [PK_be_Pages] PRIMARY KEY CLUSTERED 38( 39 [PageID] ASC 40) ON [PRIMARY] 41) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] 42GO 43 44/****** Table [dbo].[be_PingService] ******/ 45SET ANSI_NULLS ON 46GO 47SET QUOTED_IDENTIFIER ON 48GO 49CREATE TABLE [dbo].[be_PingService]( 50 [PingServiceID] [int] IDENTITY(1,1) NOT NULL, 51 [Link] [nvarchar](255) NULL, 52 CONSTRAINT [PK_be_PingService] PRIMARY KEY CLUSTERED 53( 54 [PingServiceID] ASC 55) ON [PRIMARY] 56) ON [PRIMARY] 57GO 58 59/****** Table [dbo].[be_Posts] ******/ 60SET ANSI_NULLS ON 61GO 62SET QUOTED_IDENTIFIER ON 63GO 64CREATE TABLE [dbo].[be_Posts]( 65 [PostID] [uniqueidentifier] ROWGUIDCOL NOT NULL CONSTRAINT [DF_be_Posts_PostID] DEFAULT (newid()), 66 [Title] [nvarchar](255) NULL, 67 [Description] [ntext] NULL, 68 [PostContent] [ntext] NULL, 69 [DateCreated] [datetime] NULL, 70 [DateModified] [datetime] NULL, 71 [Author] [nvarchar](50) NULL, 72 [IsPublished] [bit] NULL, 73 [IsCommentEnabled] [bit] NULL, 74 [Raters] [int] NULL, 75 [Rating] [real] NULL, 76 [Slug] [nvarchar](255) NULL, 77 CONSTRAINT [PK_be_Posts] PRIMARY KEY CLUSTERED 78( 79 [PostID] ASC 80) ON [PRIMARY] 81) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] 82GO 83 84/****** Table [dbo].[be_Settings] ******/ 85SET ANSI_NULLS ON 86GO 87SET QUOTED_IDENTIFIER ON 88GO 89CREATE TABLE [dbo].[be_Settings]( 90 [SettingName] [nvarchar](50) NOT NULL, 91 [SettingValue] [ntext] NULL, 92 CONSTRAINT [PK_be_Settings] PRIMARY KEY CLUSTERED 93( 94 [SettingName] ASC 95) ON [PRIMARY] 96) ON [PRIMARY] 97GO 98 99/****** Table [dbo].[be_PostCategory] ******/ 100SET ANSI_NULLS ON 101GO 102SET QUOTED_IDENTIFIER ON 103GO 104CREATE TABLE [dbo].[be_PostCategory]( 105 [PostCategoryID] [int] IDENTITY(1,1) NOT NULL, 106 [PostID] [uniqueidentifier] NOT NULL, 107 [CategoryID] [uniqueidentifier] NOT NULL, 108 CONSTRAINT [PK_be_PostCategory] PRIMARY KEY CLUSTERED 109( 110 [PostCategoryID] ASC 111) ON [PRIMARY] 112) ON [PRIMARY] 113 114GO 115ALTER TABLE [dbo].[be_PostCategory] WITH CHECK ADD CONSTRAINT [FK_be_PostCategory_be_Categories] FOREIGN KEY([CategoryID]) 116REFERENCES [dbo].[be_Categories] ([CategoryID]) 117GO 118ALTER TABLE [dbo].[be_PostCategory] CHECK CONSTRAINT [FK_be_PostCategory_be_Categories] 119GO 120ALTER TABLE [dbo].[be_PostCategory] WITH CHECK ADD CONSTRAINT [FK_be_PostCategory_be_Posts] FOREIGN KEY([PostID]) 121REFERENCES [dbo].[be_Posts] ([PostID]) 122GO 123ALTER TABLE [dbo].[be_PostCategory] CHECK CONSTRAINT [FK_be_PostCategory_be_Posts] 124GO 125 126/****** Table [dbo].[be_PostComment] ******/ 127SET ANSI_NULLS ON 128GO 129SET QUOTED_IDENTIFIER ON 130GO 131CREATE TABLE [dbo].[be_PostComment]( 132 [PostCommentID] [uniqueidentifier] ROWGUIDCOL NOT NULL CONSTRAINT [DF_be_PostComment_PostCommentID] DEFAULT (newid()), 133 [PostID] [uniqueidentifier] NOT NULL, 134 [CommentDate] [datetime] NOT NULL, 135 [Author] [nvarchar](255) NULL, 136 [Email] [nvarchar](255) NULL, 137 [Website] [nvarchar](255) NULL, 138 [Comment] [ntext] NULL, 139 [Country] [nvarchar](255) NULL, 140 [Ip] [nvarchar](50) NULL, 141 [IsApproved] [bit] NULL, 142 CONSTRAINT [PK_be_PostComment] PRIMARY KEY CLUSTERED 143( 144 [PostCommentID] ASC 145) ON [PRIMARY] 146) ON [PRIMARY] 147 148GO 149ALTER TABLE [dbo].[be_PostComment] WITH CHECK ADD CONSTRAINT [FK_be_PostComment_be_Posts] FOREIGN KEY([PostID]) 150REFERENCES [dbo].[be_Posts] ([PostID]) 151GO 152ALTER TABLE [dbo].[be_PostComment] CHECK CONSTRAINT [FK_be_PostComment_be_Posts] 153GO 154 155/****** Table [dbo].[be_PostNotify] ******/ 156SET ANSI_NULLS ON 157GO 158SET QUOTED_IDENTIFIER ON 159GO 160CREATE TABLE [dbo].[be_PostNotify]( 161 [PostNotifyID] [int] IDENTITY(1,1) NOT NULL, 162 [PostID] [uniqueidentifier] NOT NULL, 163 [NotifyAddress] [nvarchar](255) NULL, 164 CONSTRAINT [PK_be_PostNotify] PRIMARY KEY CLUSTERED 165( 166 [PostNotifyID] ASC 167) ON [PRIMARY] 168) ON [PRIMARY] 169 170GO 171ALTER TABLE [dbo].[be_PostNotify] WITH CHECK ADD CONSTRAINT [FK_be_PostNotify_be_Posts] FOREIGN KEY([PostID]) 172REFERENCES [dbo].[be_Posts] ([PostID]) 173GO 174ALTER TABLE [dbo].[be_PostNotify] CHECK CONSTRAINT [FK_be_PostNotify_be_Posts] 175GO 176 177/****** Table [dbo].[be_PostTag] ******/ 178SET ANSI_NULLS ON 179GO 180SET QUOTED_IDENTIFIER ON 181GO 182CREATE TABLE [dbo].[be_PostTag]( 183 [PostTagID] [int] IDENTITY(1,1) NOT NULL, 184 [PostID] [uniqueidentifier] NOT NULL, 185 [Tag] [nvarchar](50) NULL, 186 CONSTRAINT [PK_be_PostTag] PRIMARY KEY CLUSTERED 187( 188 [PostTagID] ASC 189) ON [PRIMARY] 190) ON [PRIMARY] 191 192GO 193ALTER TABLE [dbo].[be_PostTag] WITH CHECK ADD CONSTRAINT [FK_be_PostTag_be_Posts] FOREIGN KEY([PostID]) 194REFERENCES [dbo].[be_Posts] ([PostID]) 195GO 196ALTER TABLE [dbo].[be_PostTag] CHECK CONSTRAINT [FK_be_PostTag_be_Posts] 197GO 198 199/****** Index [FK_PostID] ******/ 200CREATE NONCLUSTERED INDEX [FK_PostID] ON [dbo].[be_PostCategory] 201( 202 [PostID] ASC 203) ON [PRIMARY] 204GO 205 206/****** Index [FK_CategoryID] ******/ 207CREATE NONCLUSTERED INDEX [FK_CategoryID] ON [dbo].[be_PostCategory] 208( 209 [CategoryID] ASC 210) ON [PRIMARY] 211GO 212 213/****** Index [FK_PostID] ******/ 214CREATE NONCLUSTERED INDEX [FK_PostID] ON [dbo].[be_PostComment] 215( 216 [PostID] ASC 217) ON [PRIMARY] 218GO 219 220/****** Index [FK_PostID] ******/ 221CREATE NONCLUSTERED INDEX [FK_PostID] ON [dbo].[be_PostNotify] 222( 223 [PostID] ASC 224) ON [PRIMARY] 225GO 226 227/****** Index [FK_PostID] ******/ 228CREATE NONCLUSTERED INDEX [FK_PostID] ON [dbo].[be_PostTag] 229( 230 [PostID] ASC 231) ON [PRIMARY] 232 233/*** Load initial Data ***/ 234INSERT [be_Settings] ( [SettingName] , [SettingValue] ) VALUES ( 'alternatefeedurl' , '' ) 235INSERT [be_Settings] ( [SettingName] , [SettingValue] ) VALUES ( 'authorname' , 'My name' ) 236INSERT [be_Settings] ( [SettingName] , [SettingValue] ) VALUES ( 'avatar' , 'combine' ) 237INSERT [be_Settings] ( [SettingName] , [SettingValue] ) VALUES ( 'blogrollmaxlength' , '23' ) 238INSERT [be_Settings] ( [SettingName] , [SettingValue] ) VALUES ( 'blogrollupdateminutes' , '60' ) 239INSERT [be_Setti