Backup/Discuz.Web/upgrade/sqlscript/sqlserver/album.txt

(完整代码) 1017B


if exists (select * from dbo.sysobjects where id = object_id(N'[dnt_phototags]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dnt_phototags]
;

CREATE TABLE [dnt_phototags] (
	[tagid] [int] NOT NULL ,
	[photoid] [int] NOT NULL 
) ON [PRIMARY]
;

ALTER TABLE [dnt_phototags] WITH NOCHECK ADD 
	CONSTRAINT [DF_dnt_phototags_tagid] DEFAULT (0) FOR [tagid],
	CONSTRAINT [DF_dnt_phototags_pid] DEFAULT (0) FOR [photoid]
;


IF NOT EXISTS(
SELECT  *
FROM    syscolumns
WHERE   id = ( SELECT   id
               FROM     sysobjects
               WHERE    name = 'dnt_photos'
             )
        AND name = 'width')
        
ALTER TABLE [dnt_photos] ADD [width] [int] DEFAULT(0) NOT NULL  ;


IF NOT EXISTS(
SELECT  *
FROM    syscolumns
WHERE   id = ( SELECT   id
               FROM     sysobjects
               WHERE    name = 'dnt_photos'
             )
        AND name = 'height')
        
ALTER TABLE [dnt_photos] ADD [height] [int] DEFAULT(0) NOT NULL  ;


24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。