IF NOT EXISTS (
    SELECT 1 FROM sys.tables WHERE name = 'PBM_FUNCIONAL_PRE_AUTH_LOG'
)
BEGIN
    CREATE TABLE PBM_FUNCIONAL_PRE_AUTH_LOG (
        NUMERO_AUTORIZACAO VARCHAR(50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
        CREATED_AT         VARCHAR(30) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
        DT_GRAVACAO        DATETIME     NOT NULL DEFAULT (GETDATE()),
        CONSTRAINT PK_PBM_FUNCIONAL_PRE_AUTH_LOG PRIMARY KEY (NUMERO_AUTORIZACAO)
    );
END
GO


