-- It is required only for OM upgrade
-- Begin fix for MW-6709

-- UpdateType = Software enum value was bumped up by one to make room for new UpdateClassficiations value
if not exists(select * from MwusRevision where UpdateType = 4)
begin
	update 
		MwusRevision
	set 
		UpdateType = 4
	where 
		UpdateType = 3
end
go

-- UpdateType = Category now split into Categories and Classfications (i.e. more granular)
update 
	MwusRevision
set 
	UpdateType = 3
where 
	UpdateGuid in
(
'68C5B0A3-D1A6-4553-AE49-01D3A7827828',--	Service Packs
'CD5FFD1E-E932-4E3A-BF74-18BF0B1BBD83',--	Updates
'E0789628-CE08-4437-BE74-2495B842F43B',--	Definition Updates
'E6CF1350-C01B-414D-A61F-263D14D133B4',--	Critical Updates
'B4832BD8-E735-4761-8DAF-37F882276DAB',--	Tools
'EBFC1FC5-71A4-4F7B-9ACA-3B9A503104A0',--	Drivers
'B54E7D24-7ADD-428F-8B75-90A396FA584F',--	Feature Packs
'3689BDC8-B205-4AF4-8D4A-A63924C5E9D5',--	Upgrades
'0FA1201D-4330-4FA8-8AE9-B877473B6441',--	Security Updates
'28BC880E-0592-4CBF-8F95-C79B17911D5F'--	Update Rollups
)
and 
	UpdateType = 2
go

-- End fix for MW-6709