------------------------------- Fix Bug MW-5442
-- Adding Cascade deletion to FK_MwusRevisionLanguage_MwusRevision: dropping contraint first, and then re-adding it.
IF OBJECT_ID('FK_MwusRevisionLanguage_MwusRevision') IS NOT NULL
    ALTER TABLE [dbo].[MwusRevisionLanguage]
	DROP CONSTRAINT [FK_MwusRevisionLanguage_MwusRevision]
GO

ALTER TABLE [dbo].[MwusRevisionLanguage]  WITH NOCHECK ADD  CONSTRAINT [FK_MwusRevisionLanguage_MwusRevision] FOREIGN KEY([RevisionID])
REFERENCES [dbo].[MwusRevision] ([RevisionID])
ON DELETE CASCADE
GO

ALTER TABLE [dbo].[MwusRevisionLanguage] CHECK CONSTRAINT [FK_MwusRevisionLanguage_MwusRevision]
GO
-- End fix Bug MW-5442