IF OBJECT_ID (N'Forum_SynchronizeForum', N'P') IS NOT NULL
	DROP PROCEDURE Forum_SynchronizeForum
GO

IF OBJECT_ID (N'Forum_SynchronizeTopic', N'P') IS NOT NULL
	DROP PROCEDURE Forum_SynchronizeTopic
GO

IF OBJECT_ID (N'Forum_SynchronizeUser', N'P') IS NOT NULL
	DROP PROCEDURE Forum_SynchronizeUser
GO

IF OBJECT_ID(N'FK_ForumInSite_ForumId_Forum_Id', N'F') IS NOT NULL 
	ALTER TABLE b_ForumInSite DROP CONSTRAINT FK_ForumInSite_ForumId_Forum_Id
GO

IF OBJECT_ID(N'FK_ForumInSite_SiteId_Site_Id', N'F') IS NOT NULL 
	ALTER TABLE b_ForumInSite DROP CONSTRAINT FK_ForumInSite_SiteId_Site_Id
GO

IF OBJECT_ID(N'FK_ForumTopic_ForumId_Forum_Id', N'F') IS NOT NULL 
	ALTER TABLE b_ForumTopic DROP CONSTRAINT FK_ForumTopic_ForumId_Forum_Id
GO

IF OBJECT_ID(N'FK_ForumPost_ForumId_Forum_Id', N'F') IS NOT NULL 
	ALTER TABLE b_ForumPost DROP CONSTRAINT FK_ForumPost_ForumId_Forum_Id
GO

IF OBJECT_ID(N'FK_ForumPost_TopicId_ForumTopic_Id', N'F') IS NOT NULL 
	ALTER TABLE b_ForumPost DROP CONSTRAINT FK_ForumPost_TopicId_ForumTopic_Id
GO

IF OBJECT_ID(N'b_ForumCategory', N'U') IS NOT NULL 
	DROP TABLE b_ForumCategory;
GO

IF OBJECT_ID(N'b_Forum', N'U') IS NOT NULL 
	DROP TABLE b_Forum;
GO

IF OBJECT_ID(N'b_ForumInSite', N'U') IS NOT NULL 
	DROP TABLE b_ForumInSite;
GO

IF OBJECT_ID(N'b_ForumUser', N'U') IS NOT NULL 
	DROP TABLE b_ForumUser;
GO

IF OBJECT_ID(N'b_ForumTopic', N'U') IS NOT NULL 
	DROP TABLE b_ForumTopic;
GO

IF OBJECT_ID(N'b_ForumPost', N'U') IS NOT NULL 
	DROP TABLE b_ForumPost;
GO
