IF OBJECT_ID('GLB_USU_MAQUINA_HISTORICO') IS NULL
BEGIN
CREATE TABLE [dbo].[GLB_USU_MAQUINA_HISTORICO](
	[CD_CTR] [int] IDENTITY(1,1) NOT NULL,
	[CD_USU] [int] NULL,
	[NM_MAQUINA] [varchar](150) NULL,
	[DT_CAD] [datetime] NULL,
 CONSTRAINT [PK_GLB_USU_MAQUINA_HISTORICO] 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].[GLB_USU_MAQUINA_HISTORICO] ADD  CONSTRAINT [DF_GLB_USU_MAQUINA_HISTORICO_DT_CAD]  DEFAULT (getdate()) FOR [DT_CAD]
END

