﻿IF not EXISTS( SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'SanadFormat' AND  COLUMN_NAME = 'Dom_ID_RowType')
begin
	alter table dbo.SanadFormat	add Dom_ID_RowType int references dbo.domain(ID) not null default 1483
end
;
IF not EXISTS( SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'SanadFormat' AND  COLUMN_NAME = 'UserParameter')
begin
	alter table dbo.SanadFormat	add UserParameter nvarchar(max) null
end