IF  NOT EXISTS (SELECT * FROM sys.objects 
					WHERE object_id = OBJECT_ID(N'[dbo].[GLB_USU_SENHA_HISTORICO]') 
					AND type in (N'U')) 
begin
CREATE TABLE [dbo].[GLB_USU_SENHA_HISTORICO](
	[CD_CTR] [int] IDENTITY(1,1) NOT NULL,
	[CD_USU] [int] NOT NULL,
	[SENHA] [varchar](100) NOT NULL,
	[DT_CAD] [datetime] NOT NULL,
	[CD_USU_CAD] [int] NOT NULL,
 CONSTRAINT [PK_GLB_USU_SENHA_HISTORICO_1] 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_SENHA_HISTORICO] ADD  CONSTRAINT [DF_GLB_USU_SENHA_HISTORICO_CD_USU]  DEFAULT ((0)) FOR [CD_USU]
ALTER TABLE [dbo].[GLB_USU_SENHA_HISTORICO] ADD  CONSTRAINT [DF_GLB_USU_SENHA_HISTORICO_SENHA]  DEFAULT ('') FOR [SENHA]
ALTER TABLE [dbo].[GLB_USU_SENHA_HISTORICO] ADD  CONSTRAINT [DF_GLB_USU_SENHA_HISTORICO_DT_CAD]  DEFAULT (getdate()) FOR [DT_CAD]
ALTER TABLE [dbo].[GLB_USU_SENHA_HISTORICO] ADD  CONSTRAINT [DF_GLB_USU_SENHA_HISTORICO_CD_USU_CAD]  DEFAULT ((0)) FOR [CD_USU_CAD]
end

