
--微信推送表
if NOT exists (select * from dbo.sysobjects where id = object_id(N'pushNews') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
CREATE TABLE pushNews(
	[pkid] [int] IDENTITY(1,1) NOT NULL,
	[type] [varchar](10) NULL,
	[newsid] [int] NULL,
	[auther] [varchar](100) NULL,
	[intactTitle] [varchar](100) NULL,
	[content] [text] NULL,
	[descript] [varchar](1000) NULL,
	[imageUrl] [varchar](100) NULL,
	[Url] [varchar](100) NULL,
	[isCover] [int] NULL,
	[pushTime] [datetime] NULL,
	[state] [varchar](200) NULL
) ON [PRIMARY] 

GO

--相册表
if NOT exists (select * from dbo.sysobjects where id = object_id(N'album') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
create table album
(
pkId int IDENTITY (1,1) PRIMARY KEY ,
albumname varchar(50) default '默认值' null ,
bigclassId int default 0 ,
menuId int NULL,
isTop int NULL,
itemType int NULL,
specialId int NULL,
departmentId int NULL,
gate int NULL,
gradeId int NULL,
updateTime datetime NULL,
imageName varchar(100) NULL,
Priority int NULL

) 

GO

--新增接口表
if NOT exists (select * from dbo.sysobjects where id = object_id(N'siteDataex') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
CREATE TABLE siteDataex
(
	[pkId] [int] IDENTITY(1,1) NOT NULL,
	[mcode] [varchar](50) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[mname] [varchar](100) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[sql] [varchar](1000) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[parameter] [nvarchar](200) COLLATE Chinese_PRC_CI_AS NULL
	 
) ON [PRIMARY]
GO

--新增新闻内容表
if NOT exists (select * from dbo.sysobjects where id = object_id(N'newsContent') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
CREATE TABLE [newsContent] (
	[pkId] [int] IDENTITY (1, 1) NOT NULL ,
	[newsId] [int] NOT NULL ,
	[content] [varchar](max) NULL,
	CONSTRAINT [PK_newsContent] PRIMARY KEY  CLUSTERED 
	(
		[pkId]
	)  ON [PRIMARY] 
) ON [PRIMARY]
GO

