SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[bbs]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[bbs](
	[time] [datetime] NULL,
	[istop] [bit] NOT NULL,
	[isred] [bit] NOT NULL,
	[classid] [int] NULL,
	[click] [int] NULL,
	[uid] [int] NULL,
	[ip] [nvarchar](255) NULL,
	[title] [nvarchar](255) NULL,
	[content] [nvarchar](max) NULL,
	[id] [int] IDENTITY(1,1) NOT NULL
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[bbs_class]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[bbs_class](
	[layout] [bit] NOT NULL,
	[themecount] [int] NULL,
	[postcount] [int] NULL,
	[sorting] [int] NULL,
	[parentid] [int] NULL,
	[n] [nvarchar](255) NULL,
	[note] [nvarchar](max) NULL,
	[manager] [nvarchar](255) NULL,
	[id] [int] IDENTITY(1,1) NOT NULL
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[bbs_pl]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[bbs_pl](
	[time] [datetime] NULL,
	[uid] [int] NULL,
	[fid] [int] NULL,
	[classid] [int] NULL,
	[enable] [bit] NOT NULL,
	[ip] [nvarchar](255) NULL,
	[content] [nvarchar](max) NULL,
	[id] [int] IDENTITY(1,1) NOT NULL
) ON [PRIMARY]
END
