IF NOT EXISTS (
    SELECT 1
    FROM sys.columns
    WHERE name = 'VLR_INICIAL'
      AND object_id = OBJECT_ID('EST_RPS')
)
BEGIN
    ALTER TABLE EST_RPS ADD VLR_INICIAL MONEY NULL;
END
GO

IF NOT EXISTS (
    SELECT 1
    FROM sys.columns
    WHERE name = 'VLR_MULTA'
      AND object_id = OBJECT_ID('EST_RPS')
)
BEGIN
    ALTER TABLE EST_RPS ADD VLR_MULTA MONEY NULL;
END
GO

IF NOT EXISTS (
    SELECT 1
    FROM sys.columns
    WHERE name = 'VLR_JUROS'
      AND object_id = OBJECT_ID('EST_RPS')
)
BEGIN
    ALTER TABLE EST_RPS ADD VLR_JUROS MONEY NULL;
END
GO

IF NOT EXISTS (
    SELECT 1
    FROM sys.columns
    WHERE name = 'VLR_IPI'
      AND object_id = OBJECT_ID('EST_RPS')
)
BEGIN
    ALTER TABLE EST_RPS ADD VLR_IPI MONEY NULL;
END
GO

IF NOT EXISTS (
    SELECT 1
    FROM sys.columns
    WHERE name = 'PGTO_PARC_ANTECIP'
      AND object_id = OBJECT_ID('EST_RPS')
)
BEGIN
    ALTER TABLE EST_RPS ADD PGTO_PARC_ANTECIP INT NULL;
END
GO
