if not Exists(SELECT * FROM information_schema.tables where Table_name = 'PopularityVote') begin create table PopularityVote ( ID int Primary key, Reference_ID bigint not null, -- شناسه مرجع رای Dom_ID int references domain(ID) not null, -- نوع مرجع رای Dom_ID_VoteType int references domain(ID) not null, -- upVote , downVote Mat_ID bigint references Matter(ID) not null, Taf_ID bigint references Tafsili(ID) not null, Value int not null, Tarikh int not null, Saat int not null, Description nvarchar(1000) ) end