IF NOT EXISTS(SELECT 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='INTEGRA_PROPZ_EVENTOS') 
BEGIN
CREATE TABLE INTEGRA_PROPZ_EVENTOS (
  [ID] [uniqueidentifier] NOT NULL DEFAULT newid(),
  [TABELA] [nvarchar](128) NOT NULL,
  [CD_EMP] [int] NULL,
  [CD_FILIAL] [int] NULL,
  [CD_REGISTRO] [int] NOT NULL,
  [TP_EVENTO] [int] NOT NULL,
  [HR_EVENTO] [datetime] NOT NULL DEFAULT getdate(),
  [ST_EVENTO] [int] NOT NULL DEFAULT (0),
  [DT_ULT_ALT] [datetime] NULL,
  [CD_USU] [int] NULL,
  [DT_DOCUMENTO] [datetime] NOT NULL,
  [APP_NAME] [varchar](100) NULL DEFAULT app_name(),
  [IP_CLIENTE] [varchar](100) NULL DEFAULT CONVERT([varchar], connectionproperty('client_net_address')),
  [HOST_NAME] [varchar](100) NULL DEFAULT host_name(),
  CONSTRAINT [PK_INTEGRA_PROPZ_EVENTOS] PRIMARY KEY CLUSTERED ([ID] ASC)
) ON [PRIMARY];
END