IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_ADM_ERRO_GLB_USU_ADM_ERRO]'))
begin
ALTER TABLE [dbo].[ADM_ERRO_GLB_USU] DROP CONSTRAINT [FK_ADM_ERRO_GLB_USU_ADM_ERRO]
end

IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_ADM_ERRO_GLB_USU_GLB_USU]'))
begin
ALTER TABLE [dbo].[ADM_ERRO_GLB_USU] DROP CONSTRAINT [FK_ADM_ERRO_GLB_USU_GLB_USU]
end

IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_ADM_ERRO_EST_PROD_TRANSF_ADM_ERRO]'))
begin
ALTER TABLE [dbo].[ADM_ERRO_EST_PROD_TRANSF] DROP CONSTRAINT [FK_ADM_ERRO_EST_PROD_TRANSF_ADM_ERRO]
end

IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_ADM_ERRO_EST_PROD_TRANSF_EST_PROD_TRANSF]'))
begin
ALTER TABLE [dbo].[ADM_ERRO_EST_PROD_TRANSF] DROP CONSTRAINT [FK_ADM_ERRO_EST_PROD_TRANSF_EST_PROD_TRANSF]
end

IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_ADM_ERRO_EST_PED_VD_EST_PED_VD]'))
begin
ALTER TABLE [dbo].[ADM_ERRO_EST_PED_VD] DROP CONSTRAINT [FK_ADM_ERRO_EST_PED_VD_EST_PED_VD]
end

IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_ADM_ERRO_EST_PED_VD_ADM_ERRO_EST_PED_VD]'))
begin
ALTER TABLE [dbo].[ADM_ERRO_EST_PED_VD] DROP CONSTRAINT [FK_ADM_ERRO_EST_PED_VD_ADM_ERRO_EST_PED_VD]
end

IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_ADM_ERRO_EST_NF_SAI_EST_NF_SAI]'))
begin
ALTER TABLE [dbo].[ADM_ERRO_EST_NF_SAI] DROP CONSTRAINT [FK_ADM_ERRO_EST_NF_SAI_EST_NF_SAI]
end

IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_ADM_ERRO_EST_NF_SAI_ADM_ERRO]'))
begin
ALTER TABLE [dbo].[ADM_ERRO_EST_NF_SAI] DROP CONSTRAINT [FK_ADM_ERRO_EST_NF_SAI_ADM_ERRO]
end

IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_ADM_ERRO_EST_NF_ENT_EST_NF_ENT]'))
begin
ALTER TABLE [dbo].[ADM_ERRO_EST_NF_ENT] DROP CONSTRAINT [FK_ADM_ERRO_EST_NF_ENT_EST_NF_ENT]
end

IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_ADM_ERRO_EST_NF_ENT_ADM_ERRO]'))
begin
ALTER TABLE [dbo].[ADM_ERRO_EST_NF_ENT] DROP CONSTRAINT [FK_ADM_ERRO_EST_NF_ENT_ADM_ERRO]
end

IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_ADM_ERRO_EST_NF_INTEGRACOES_ADM_ERRO]'))
begin
ALTER TABLE [dbo].[ADM_ERRO_EST_NF_INTEGRACOES] DROP CONSTRAINT [FK_ADM_ERRO_EST_NF_INTEGRACOES_ADM_ERRO]
end 

IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_ADM_ERRO_EST_NF_ENT_DANFE_PROVISORIO_ADM_ERRO]'))
begin
ALTER TABLE [dbo].[ADM_ERRO_EST_NF_ENT_DANFE_PROVISORIO] DROP CONSTRAINT [FK_ADM_ERRO_EST_NF_ENT_DANFE_PROVISORIO_ADM_ERRO]
end

IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_ADM_ERRO_EST_NF_ENT_DANFE_PROVISORIO_EST_NF_ENT_DANFE_PROVISORIO]'))
begin
ALTER TABLE [dbo].[ADM_ERRO_EST_NF_ENT_DANFE_PROVISORIO] DROP CONSTRAINT [FK_ADM_ERRO_EST_NF_ENT_DANFE_PROVISORIO_EST_NF_ENT_DANFE_PROVISORIO]
end