IF OBJECT_ID('EST_PROD_MIX_AGD_BLOQUEIO_FILIAL') IS NULL
begin
CREATE TABLE [dbo].[EST_PROD_MIX_AGD_BLOQUEIO_FILIAL] (
  [CD_CTR] BIGINT NOT NULL , 
  [CD_FILIAL]  int not NULL , 
 
  CONSTRAINT [PK_EST_PROD_MIX_AGD_BLOQUEIO_FILIAL] PRIMARY KEY CLUSTERED ([CD_CTR],[CD_FILIAL]),
  
  CONSTRAINT [FK_EST_PROD_MIX_AGD_BLOQUEIO_FILIAL] FOREIGN KEY ([CD_CTR]) 
  REFERENCES [dbo].[EST_PROD_MIX_AGD_BLOQUEIO] ([CD_CTR]) 
  ON UPDATE NO ACTION
  ON DELETE CASCADE 
)
ON [PRIMARY]
end
