温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:LiveBlog v1.0测试版源码
当前文件:
LiveBlog/LiveBlog.Web/App_Data/MSSQL2005Setup1.3.1.0.sql,打开代码结构图
LiveBlog/LiveBlog.Web/App_Data/MSSQL2005Setup1.3.1.0.sql,打开代码结构图1/****** BlogEngine.NET 1.3 SQL Setup Script ******/ 2
/****** Object: Table [dbo].[be_Categories] Script Date: 12/22/2007 14:14:54 ******/ 3
SET ANSI_NULLS ON 4
GO 5
SET QUOTED_IDENTIFIER ON 6
GO 7
CREATE TABLE [dbo].[be_Categories]( 8
[CategoryID] [uniqueidentifier] ROWGUIDCOL NOT NULL CONSTRAINT [DF_be_Categories_CategoryID] DEFAULT (newid()), 9
[CategoryName] [nvarchar](50) NULL, 10
[Description] [nvarchar](200) NULL, 11
CONSTRAINT [PK_be_Categories] PRIMARY KEY CLUSTERED 12
( 13
[CategoryID] ASC 14
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] 15
) ON [PRIMARY] 16
GO 17
/****** Object: Table [dbo].[be_Pages] Script Date: 12/22/2007 14:15:17 ******/ 18
SET ANSI_NULLS ON 19
GO 20
SET QUOTED_IDENTIFIER ON 21
GO 22
CREATE TABLE [dbo].[be_Pages]( 23
[PageID] [uniqueidentifier] ROWGUIDCOL NOT NULL CONSTRAINT [DF_be_Pages_PageID] DEFAULT (newid()), 24
[Title] [nvarchar](255) NULL, 25
[Description] [nvarchar](max) NULL, 26
[PageContent] [ntext] NULL, 27
[Keywords] [nvarchar](max) NULL, 28
[DateCreated] [datetime] NULL, 29
[DateModified] [datetime] NULL, 30
[IsPublished] [bit] NULL, 31
[IsFrontPage] [bit] NULL, 32
[Parent] [uniqueidentifier] NULL, 33
[ShowInList] [bit] NULL, 34
[Slug] nvarchar](255) NULL, 35
CONSTRAINT [PK_be_Pages] PRIMARY KEY CLUSTERED 36
( 37
[PageID] 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] TEXTIMAGE_ON [PRIMARY] 40
GO 41
/****** Object: Table [dbo].[be_PingService] Script Date: 12/22/2007 14:15:47 ******/ 42
SET ANSI_NULLS ON 43
GO 44
SET QUOTED_IDENTIFIER ON 45
GO 46
CREATE TABLE [dbo].[be_PingService]( 47
[PingServiceID] [int] IDENTITY(1,1) NOT NULL, 48
[Link] [nvarchar](255) NULL, 49
CONSTRAINT [PK_be_PingService] PRIMARY KEY CLUSTERED 50
( 51
[PingServiceID] ASC 52
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] 53
) ON [PRIMARY] 54
GO 55
/****** Object: Table [dbo].[be_Posts] Script Date: 12/22/2007 14:16:27 ******/ 56
SET ANSI_NULLS ON 57
GO 58
SET QUOTED_IDENTIFIER ON 59
GO 60
CREATE TABLE [dbo].[be_Posts]( 61
[PostID] [uniqueidentifier] ROWGUIDCOL NOT NULL CONSTRAINT [DF_be_Posts_PostID] DEFAULT (newid()), 62
[Title] [nvarchar](255) NULL, 63
[Description] [nvarchar](max) NULL, 64
[PostContent] [ntext] NULL, 65
[DateCreated] [datetime] NULL, 66
[DateModified] [datetime] NULL, 67
[Author] [nvarchar](50) NULL, 68
[IsPublished] [bit] NULL, 69
[IsCommentEnabled] [bit] NULL, 70
[Raters] [int] NULL, 71
[Rating] [real] NULL, 72
[Slug] [nvarchar](255) NULL, 73
CONSTRAINT [PK_be_Posts] PRIMARY KEY CLUSTERED 74
( 75
[PostID] ASC 76
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] 77
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] 78
GO 79
/****** Object: Table [dbo].[be_Settings] Script Date: 12/22/2007 14:16:07 ******/ 80
SET ANSI_NULLS ON 81
GO 82
SET QUOTED_IDENTIFIER ON 83
GO 84
CREATE TABLE [dbo].[be_Settings]( 85
[SettingName] [nvarchar](50) NOT NULL, 86
[SettingValue] [nvarchar](max) NULL, 87
CONSTRAINT [PK_be_Settings] PRIMARY KEY CLUSTERED 88
( 89
[SettingName] ASC 90
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] 91
) ON [PRIMARY] 92
GO 93
/****** Object: Table [dbo].[be_PostCategory] Script Date: 12/22/2007 14:17:00 ******/ 94
SET ANSI_NULLS ON 95
GO 96
SET QUOTED_IDENTIFIER ON 97
GO 98
CREATE TABLE [dbo].[be_PostCategory]( 99
[PostCategoryID] [int] IDENTITY(1,1) NOT NULL, 100
[PostID] [uniqueidentifier] NOT NULL, 101
[CategoryID] [uniqueidentifier] NOT NULL, 102
CONSTRAINT [PK_be_PostCategory] PRIMARY KEY CLUSTERED 103
( 104
[PostCategoryID] ASC 105
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] 106
) ON [PRIMARY] 107
108
GO 109
ALTER TABLE [dbo].[be_PostCategory] WITH CHECK ADD CONSTRAINT [FK_be_PostCategory_be_Categories] FOREIGN KEY([CategoryID]) 110
REFERENCES [dbo].[be_Categories] ([CategoryID]) 111
GO 112
ALTER TABLE [dbo].[be_PostCategory] CHECK CONSTRAINT [FK_be_PostCategory_be_Categories] 113
GO 114
ALTER TABLE [dbo].[be_PostCategory] WITH CHECK ADD CONSTRAINT [FK_be_PostCategory_be_Posts] FOREIGN KEY([PostID]) 115
REFERENCES [dbo].[be_Posts] ([PostID]) 116
GO 117
ALTER TABLE [dbo].[be_PostCategory] CHECK CONSTRAINT [FK_be_PostCategory_be_Posts] 118
GO 119
/****** Object: Table [dbo].[be_PostComment] Script Date: 12/22/2007 14:17:15 ******/ 120
SET ANSI_NULLS ON 121
GO 122
SET QUOTED_IDENTIFIER ON 123
GO 124
CREATE TABLE [dbo].[be_PostComment]( 125
[PostCommentID] [uniqueidentifier] ROWGUIDCOL NOT NULL CONSTRAINT [DF_be_PostComment_PostCommentID] DEFAULT (newid()), 126
[PostID] [uniqueidentifier] NOT NULL, 127
[CommentDate] [datetime] NOT NULL, 128
[Author] [nvarchar](255) NULL, 129
[Email] [nvarchar](255) NULL, 130
[Website] [nvarchar](255) NULL, 131
[Comment] [nvarchar](max) NULL, 132
[Country] [nvarchar](255) NULL, 133
[Ip] [nvarchar](50) NULL, 134
[IsApproved] [bit] NULL, 135
CONSTRAINT [PK_be_PostComment] PRIMARY KEY CLUSTERED 136
( 137
[PostCommentID] ASC 138
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] 139
) ON [PRIMARY] 140
141
GO 142
ALTER TABLE [dbo].[be_PostComment] WITH CHECK ADD CONSTRAINT [FK_be_PostComment_be_Posts] FOREIGN KEY([PostID]) 143
REFERENCES [dbo].[be_Posts] ([PostID]) 144
GO 145
ALTER TABLE [dbo].[be_PostComment] CHECK CONSTRAINT [FK_be_PostComment_be_Posts] 146
GO 147
/****** Object: Table [dbo].[be_PostNotify] Script Date: 12/22/2007 14:17:31 ******/ 148
SET ANSI_NULLS ON 149
GO 150
SET QUOTED_IDENTIFIER ON 151
GO 152
CREATE TABLE [dbo].[be_PostNotify]( 153
[PostNotifyID] [int] IDENTITY(1,1) NOT NULL, 154
[PostID] [uniqueidentifier] NOT NULL, 155
[NotifyAddress] [nvarchar](255) NULL, 156
CONSTRAINT [PK_be_PostNotify] PRIMARY KEY CLUSTERED 157
( 158
[PostNotifyID] ASC 159
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] 160
) ON [PRIMARY] 161
162
GO 163
ALTER TABLE [dbo].[be_PostNotify] WITH CHECK ADD CONSTRAINT [FK_be_PostNotify_be_Posts] FOREIGN KEY([PostID]) 164
REFERENCES [dbo].[be_Posts] ([PostID]) 165
GO 166
ALTER TABLE [dbo].[be_PostNotify] CHECK CONSTRAINT [FK_be_PostNotify_be_Posts] 167
GO 168
/****** Object: Table [dbo].[be_PostTag] Script Date: 12/22/2007 14:17:44 ******/ 169
SET ANSI_NULLS ON 170
GO 171
SET QUOTED_IDENTIFIER ON 172
GO 173
CREATE TABLE [dbo].[be_PostTag]( 174
[PostTagID] [int] IDENTITY(1,1) NOT NULL, 175
[PostID] [uniqueidentifier] NOT NULL, 176
[Tag] [nvarchar](50) NULL, 177
CONSTRAINT [PK_be_PostTag] PRIMARY KEY CLUSTERED 178
( 179
[PostTagID] ASC 180
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] 181
) ON [PRIMARY] 182
183
GO 184
ALTER TABLE [dbo].[be_PostTag] WITH CHECK ADD CONSTRAINT [FK_be_PostTag_be_Posts] FOREIGN KEY([PostID]) 185
REFERENCES [dbo].[be_Posts] ([PostID]) 186
GO 187
ALTER TABLE [dbo].[be_PostTag] CHECK CONSTRAINT [FK_be_PostTag_be_Posts] 188
GO 189
/****** Object: Index [FK_PostID] Script Date: 12/22/2007 14:18:36 ******/ 190
CREATE NONCLUSTERED INDEX [FK_PostID] ON [dbo].[be_PostCategory] 191
( 192
[PostID] ASC 193
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] 194
GO 195
/****** Object: Index [FK_CategoryID] Script Date: 12/22/2007 14:19:19 ******/ 196
CREATE NONCLUSTERED INDEX [FK_CategoryID] ON [dbo].[be_PostCategory] 197
( 198
[CategoryID] ASC 199
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] 200
GO 201
/****** Object: Index [FK_PostID] Script Date: 12/22/2007 14:19:45 ******/ 202
CREATE NONCLUSTERED INDEX [FK_PostID] ON [dbo].[be_PostComment] 203
( 204
[PostID] ASC 205
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] 206
GO 207
/****** Object: Index [FK_PostID] Script Date: 12/22/2007 14:20:29 ******/ 208
CREATE NONCLUSTERED INDEX [



