IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[EST_PROD_MIX_IMS]') AND type in (N'U'))
begin
CREATE TABLE [dbo].[EST_PROD_MIX_IMS](
	[CD_CTR] [int] IDENTITY(1,1) NOT NULL,
	[DS_ARQUIVO] [varchar] (250) NULL,
	[CD_EMP] [int] NOT NULL,
	[DT_CAD] [datetime] NOT NULL,	
	[CD_USU] [int] NULL,
	[DT_INI] [datetime] NULL,	
	[DT_FIM] [datetime] NOT NULL
 CONSTRAINT [PK_EST_PROD_MIX_IMS] PRIMARY KEY CLUSTERED 
(
	[CD_CTR] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]


ALTER TABLE [dbo].[EST_PROD_MIX_IMS] ADD  CONSTRAINT [DF_EST_PROD_MIX_IMS_DT_CAD]  DEFAULT (getdate()) FOR [DT_CAD]
end


