--v7.0版
--news表新增静态页功能字段
IF NOT EXISTS (SELECT name FROM syscolumns WHERE (id = OBJECT_ID(N'news')) AND (name = 'isStatic'))
alter table news add isStatic int null  
GO
IF NOT EXISTS (SELECT name FROM syscolumns WHERE (id = OBJECT_ID(N'news')) AND (name = 'staticUrl'))
alter table news add staticUrl varchar(100) null  
GO
IF NOT EXISTS (SELECT name FROM syscolumns WHERE (id = OBJECT_ID(N'news')) AND (name = 'staticTime'))
alter table news add staticTime datetime null  
GO

--修改sitepara表字段长度
alter table sitepara ALTER COLUMN pvalue varchar(max) null  
GO
--新增相册关联字段
IF NOT EXISTS (SELECT name FROM syscolumns WHERE (id = OBJECT_ID(N'news')) AND (name = 'albumId'))
ALTER TABLE news ADD albumId int 
GO

--增加密码等级参数
IF NOT EXISTS (SELECT name FROM syscolumns WHERE (id = OBJECT_ID(N'Users')) AND (name = 'pwdlevel'))
alter table Users add pwdlevel int default '0'   
GO

--增加访问pkid参数
IF NOT EXISTS (SELECT name FROM syscolumns WHERE (id = OBJECT_ID(N'stat')) AND (name = 'pkid'))
alter table stat add pkid int IDENTITY(1,1) NOT NULL
GO

--增加访问时间参数
IF NOT EXISTS (SELECT name FROM syscolumns WHERE (id = OBJECT_ID(N'stat')) AND (name = 'pvdate'))
alter table stat add pvdate varchar(50)   
GO

--增加投稿的图片路径和简介字段
IF NOT EXISTS (SELECT name FROM syscolumns WHERE (id = OBJECT_ID(N'contribute')) AND (name = 'imageName'))
alter table contribute add imageName varchar(100) null  
GO
IF NOT EXISTS (SELECT name FROM syscolumns WHERE (id = OBJECT_ID(N'contribute')) AND (name = 'descript'))
alter table contribute add descript varchar(1000) null  
GO