if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK_BBSXP_ForumPermissions_BBSXP_Forums]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[BBSXP_ForumPermissions] DROP CONSTRAINT FK_BBSXP_ForumPermissions_BBSXP_Forums
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK_BBSXP_Threads_BBSXP_Forums]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[BBSXP_Threads] DROP CONSTRAINT FK_BBSXP_Threads_BBSXP_Forums
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK_BBSXP_ForumPermissions_BBSXP_Roles]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[BBSXP_ForumPermissions] DROP CONSTRAINT FK_BBSXP_ForumPermissions_BBSXP_Roles
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK_BBSXP_Users_BBSXP_Roles]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[BBSXP_Users] DROP CONSTRAINT FK_BBSXP_Users_BBSXP_Roles
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK_BBSXP_PostRating_BBSXP_Threads]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[BBSXP_PostRating] DROP CONSTRAINT FK_BBSXP_PostRating_BBSXP_Threads
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK_BBSXP_Posts_BBSXP_Threads]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[BBSXP_Posts] DROP CONSTRAINT FK_BBSXP_Posts_BBSXP_Threads
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK_BBSXP_Vote_BBSXP_Threads]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[BBSXP_Vote] DROP CONSTRAINT FK_BBSXP_Vote_BBSXP_Threads
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK_BBSXP_Blogs_BBSXP_Users]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[BBSXP_Blogs] DROP CONSTRAINT FK_BBSXP_Blogs_BBSXP_Users
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK_BBSXP_BlogSettings_BBSXP_Users]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[BBSXP_BlogSettings] DROP CONSTRAINT FK_BBSXP_BlogSettings_BBSXP_Users
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK_BBSXP_Consort_BBSXP_Users]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[BBSXP_Consort] DROP CONSTRAINT FK_BBSXP_Consort_BBSXP_Users
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK_BBSXP_Consortia_BBSXP_Users]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[BBSXP_Consortia] DROP CONSTRAINT FK_BBSXP_Consortia_BBSXP_Users
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK_BBSXP_Favorites_BBSXP_Users]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[BBSXP_Favorites] DROP CONSTRAINT FK_BBSXP_Favorites_BBSXP_Users
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK_BBSXP_Messages_BBSXP_Users]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[BBSXP_Messages] DROP CONSTRAINT FK_BBSXP_Messages_BBSXP_Users
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK_BBSXP_Prison_BBSXP_Users]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[BBSXP_Prison] DROP CONSTRAINT FK_BBSXP_Prison_BBSXP_Users
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK_BBSXP_Threads_BBSXP_Users]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[BBSXP_Threads] DROP CONSTRAINT FK_BBSXP_Threads_BBSXP_Users
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[BBSXP_Affiche]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[BBSXP_Affiche]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[BBSXP_BlogSettings]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[BBSXP_BlogSettings]
GO
if exists (select * from dbo.sysobjects where id = objec�