
IF NOT EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PRC_SISTEMAS_CTR_VERSAO]') AND type in (N'U'))
BEGIN
	CREATE TABLE [dbo].[PRC_SISTEMAS_CTR_VERSAO](
		[CD_CTR] [int] NOT NULL DEFAULT 0,
		[CD_USU] [int] NOT NULL DEFAULT 0,
		[DT_HR_LOGIN] [smalldatetime] NOT NULL DEFAULT(getdate()),
		[END_IP] [varchar](50) NOT NULL DEFAULT '',
		[MAQUINA] [varchar](150) NOT NULL DEFAULT '',
		[SISTEMA] [varchar](50) NULL DEFAULT '',
		[VERSAO] [varchar](50) NULL DEFAULT '',
	 CONSTRAINT [PK_PRC_SISTEMAS_CTR_VERSAO] PRIMARY KEY CLUSTERED 
	(
		[CD_CTR] ASC
	)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = ON, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
	) ON [PRIMARY]
END

