﻿if not Exists(SELECT * FROM information_schema.tables where Table_name = 'VersionUpdate')
begin
	create table dbo.VersionUpdate
	(
		ID	int primary key,
		Tarikh	int not null,
		Dom_ID_Progress	int not null -- در حال بروزرسانی، 
	)
	end
;
if not Exists(SELECT * FROM information_schema.tables where Table_name = 'VersionUpdateItem')
begin
	create table dbo.VersionUpdateItem
	(
		ID	int primary key Identity(1,1),
		VU_ID	int references dbo.VersionUpdate(ID) not null,
		VUI_ID	int references dbo.VersionUpdateItem(ID) null,
		Dom_ID_Type		int not null, -- فولدر، فایل،
		Name	nvarchar(1000) not null,
		Img		image	not null
	)
end