﻿if not Exists(SELECT * FROM information_schema.tables where Table_name = 'PopularityCoupon')
begin
	create table dbo.PopularityCoupon
	(
		ID	int primary key,
		Code	nvarchar(200) not null,	
		Taf_ID	bigint references Tafsili(ID) null,
		Dom_ID_RowType	int references domain(ID) not null,
		Dom_ID	int references domain(ID) not null,
		FromDate	int not null,
		ToDate	int not null,
		Value	decimal(19,4) not null,
		Description	nvarchar(1000) null
	)
end

