﻿
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]
;


ALTER TABLE [dnt_photos] ADD [width] [int] NULL;
ALTER TABLE [dnt_photos] ADD [height] [int] NULL;


