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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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