Backup/Discuz.Web/upgrade/sqlscript/sqlserver/upgradetable25.sql
(开头部分) 18KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
--表dnt_forumfields中添加两个字段,seokeywords和seodescription,类型:ntext
if not exists(select * from syscolumns where id=object_id('dnt_forumfields') and name='seokeywords')
ALTER TABLE [dnt_forumfields] ADD [seokeywords] [nvarchar] (500) NULL
GO
if not exists(select * from syscolumns where id=object_id('dnt_forumfields') and name='seodescription')
ALTER TABLE [dnt_forumfields] ADD [seodescription] [nvarchar] (500) NULL
GO
if not exists(select * from syscolumns where id=object_id('dnt_forumfields') and name='rewritename')
ALTER TABLE [dnt_forumfields] ADD [rewritename] [nvarchar] (20) NULL
GO
IF NOT EXISTS(SELECT * FROM SYSCOLUMNS WHERE ID=OBJECT_ID('dnt_usergroups') AND NAME='allowhtmltitle')
ALTER TABLE [dnt_usergroups] ADD [allowhtmltitle] [int] NOT NULL CONSTRAINT [DF_dnt_usergroups_allowhtmltitle] DEFAULT (0)
GO
IF NOT EXISTS(SELECT * FROM SYSCOLUMNS WHERE ID=OBJECT_ID('dnt_usergroups') AND NAME='ignoreseccode')
ALTER TABLE [dnt_usergroups] ADD [ignoreseccode] [int] NOT NULL CONSTRAINT [DF_dnt_usergroups_ignoreseccode] DEFAULT (0)
GO
if not exists(select * from syscolumns where id=object_id('dnt_userfields') and name='ignorepm')
ALTER TABLE [dnt_userfields] ADD [ignorepm] [nvarchar] (1000) NOT NULL CONSTRAINT [DF_dnt_userfields_ignorepm] DEFAULT('')
GO
if not exists(select * from syscolumns where id=object_id('dnt_online') and name='newpms')
ALTER TABLE [dnt_online] ADD [newpms] [smallint] NOT NULL CONSTRAINT [DF_dnt_online_newpms] DEFAULT(0)
GO
if not exists(select * from syscolumns where id=object_id('dnt_online') and name='newnotices')
ALTER TABLE [dnt_online] ADD [newnotices] [smallint] NOT NULL CONSTRAINT [DF_dnt_online_newnotices] DEFAULT(0)
GO
if not exists(select * from syscolumns where id=object_id('dnt_topics') and name='attention')
ALTER TABLE [dnt_topics] ADD [attention] [int] NOT NULL CONSTRAINT [DF_dnt_topics_attention] DEFAULT(0)
GO
if not exists(select * from syscolumns where id=object_id('dnt_attachments') and name='attachprice')
ALTER TABLE [dnt_attachments] ADD [attachprice] [int] NOT NULL CONSTRAINT [DF_dnt_attachments_attachprice] DEFAULT(0)
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dnt_attachpaymentlog]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dnt_attachpaymentlog]
GO
CREATE TABLE [dnt_attachpaymentlog] (
[id] [int] IDENTITY (1, 1) NOT NULL ,
[uid] [int] NOT NULL ,
[username] [nchar] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[aid] [int] NOT NULL ,
[authorid] [int] NOT NULL ,
[postdatetime] [datetime] NOT NULL ,
[amount] [int] NOT NULL ,
[netamount] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dnt_attachpaymentlog] WITH NOCHECK ADD
CONSTRAINT [PK_dnt_attachpaymentlog] PRIMARY KEY CLUSTERED
(
后面还有 491 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
