温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:LiveBlog v1.0测试版源码
当前文件:
LiveBlog/LiveBlog.Web/App_Data/MSSQL2000Setup1.3.1.0.sql,打开代码结构图
LiveBlog/LiveBlog.Web/App_Data/MSSQL2000Setup1.3.1.0.sql,打开代码结构图1/****** BlogEngine.NET 1.3 SQL Setup Script ******/ 2
3
/****** Table [dbo].[be_Categories] ******/ 4
SET ANSI_NULLS ON 5
GO 6
SET QUOTED_IDENTIFIER ON 7
GO 8
CREATE 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] 17
GO 18
19
/****** Table [dbo].[be_Pages] ******/ 20
SET ANSI_NULLS ON 21
GO 22
SET QUOTED_IDENTIFIER ON 23
GO 24
CREATE 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] 42
GO 43
44
/****** Table [dbo].[be_PingService] ******/ 45
SET ANSI_NULLS ON 46
GO 47
SET QUOTED_IDENTIFIER ON 48
GO 49
CREATE 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] 57
GO 58
59
/****** Table [dbo].[be_Posts] ******/ 60
SET ANSI_NULLS ON 61
GO 62
SET QUOTED_IDENTIFIER ON 63
GO 64
CREATE 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] 82
GO 83
84
/****** Table [dbo].[be_Settings] ******/ 85
SET ANSI_NULLS ON 86
GO 87
SET QUOTED_IDENTIFIER ON 88
GO 89
CREATE 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] 97
GO 98
99
/****** Table [dbo].[be_PostCategory] ******/ 100
SET ANSI_NULLS ON 101
GO 102
SET QUOTED_IDENTIFIER ON 103
GO 104
CREATE 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
114
GO 115
ALTER TABLE [dbo].[be_PostCategory] WITH CHECK ADD CONSTRAINT [FK_be_PostCategory_be_Categories] FOREIGN KEY([CategoryID]) 116
REFERENCES [dbo].[be_Categories] ([CategoryID]) 117
GO 118
ALTER TABLE [dbo].[be_PostCategory] CHECK CONSTRAINT [FK_be_PostCategory_be_Categories] 119
GO 120
ALTER TABLE [dbo].[be_PostCategory] WITH CHECK ADD CONSTRAINT [FK_be_PostCategory_be_Posts] FOREIGN KEY([PostID]) 121
REFERENCES [dbo].[be_Posts] ([PostID]) 122
GO 123
ALTER TABLE [dbo].[be_PostCategory] CHECK CONSTRAINT [FK_be_PostCategory_be_Posts] 124
GO 125
126
/****** Table [dbo].[be_PostComment] ******/ 127
SET ANSI_NULLS ON 128
GO 129
SET QUOTED_IDENTIFIER ON 130
GO 131
CREATE 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
148
GO 149
ALTER TABLE [dbo].[be_PostComment] WITH CHECK ADD CONSTRAINT [FK_be_PostComment_be_Posts] FOREIGN KEY([PostID]) 150
REFERENCES [dbo].[be_Posts] ([PostID]) 151
GO 152
ALTER TABLE [dbo].[be_PostComment] CHECK CONSTRAINT [FK_be_PostComment_be_Posts] 153
GO 154
155
/****** Table [dbo].[be_PostNotify] ******/ 156
SET ANSI_NULLS ON 157
GO 158
SET QUOTED_IDENTIFIER ON 159
GO 160
CREATE 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
170
GO 171
ALTER TABLE [dbo].[be_PostNotify] WITH CHECK ADD CONSTRAINT [FK_be_PostNotify_be_Posts] FOREIGN KEY([PostID]) 172
REFERENCES [dbo].[be_Posts] ([PostID]) 173
GO 174
ALTER TABLE [dbo].[be_PostNotify] CHECK CONSTRAINT [FK_be_PostNotify_be_Posts] 175
GO 176
177
/****** Table [dbo].[be_PostTag] ******/ 178
SET ANSI_NULLS ON 179
GO 180
SET QUOTED_IDENTIFIER ON 181
GO 182
CREATE 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
192
GO 193
ALTER TABLE [dbo].[be_PostTag] WITH CHECK ADD CONSTRAINT [FK_be_PostTag_be_Posts] FOREIGN KEY([PostID]) 194
REFERENCES [dbo].[be_Posts] ([PostID]) 195
GO 196
ALTER TABLE [dbo].[be_PostTag] CHECK CONSTRAINT [FK_be_PostTag_be_Posts] 197
GO 198
199
/****** Index [FK_PostID] ******/ 200
CREATE NONCLUSTERED INDEX [FK_PostID] ON [dbo].[be_PostCategory] 201
( 202
[PostID] ASC 203
) ON [PRIMARY] 204
GO 205
206
/****** Index [FK_CategoryID] ******/ 207
CREATE NONCLUSTERED INDEX [FK_CategoryID] ON [dbo].[be_PostCategory] 208
( 209
[CategoryID] ASC 210
) ON [PRIMARY] 211
GO 212
213
/****** Index [FK_PostID] ******/ 214
CREATE NONCLUSTERED INDEX [FK_PostID] ON [dbo].[be_PostComment] 215
( 216
[PostID] ASC 217
) ON [PRIMARY] 218
GO 219
220
/****** Index [FK_PostID] ******/ 221
CREATE NONCLUSTERED INDEX [FK_PostID] ON [dbo].[be_PostNotify] 222
( 223
[PostID] ASC 224
) ON [PRIMARY] 225
GO 226
227
/****** Index [FK_PostID] ******/ 228
CREATE NONCLUSTERED INDEX [FK_PostID] ON [dbo].[be_PostTag] 229
( 230
[PostID] ASC 231
) ON [PRIMARY] 232
233
/*** Load initial Data ***/ 234
INSERT [be_Settings] ( [SettingName] , [SettingValue] ) VALUES ( 'alternatefeedurl' , '' ) 235
INSERT [be_Settings] ( [SettingName] , [SettingValue] ) VALUES ( 'authorname' , 'My name' ) 236
INSERT [be_Settings] ( [SettingName] , [SettingValue] ) VALUES ( 'avatar' , 'combine' ) 237
INSERT [be_Settings] ( [SettingName] , [SettingValue] ) VALUES ( 'blogrollmaxlength' , '23' ) 238
INSERT [be_Settings] ( [SettingName] , [SettingValue] ) VALUES ( 'blogrollupdateminutes' , '60' ) 239
INSERT [be_Setti


