IF EXISTS(
    SELECT *
    FROM sys.columns 
    WHERE Name      = N'vatNum'
      AND Object_ID = Object_ID(N'pal_Customer'))
BEGIN
    ALTER TABLE pal_Customer DROP COLUMN vatNum
END

IF EXISTS(
    SELECT *
    FROM sys.columns 
    WHERE Name      = N'vatNum'
      AND Object_ID = Object_ID(N'pal_Setup'))
BEGIN
    ALTER TABLE pal_Setup DROP COLUMN vatNum
END

IF EXISTS(
    SELECT *
    FROM sys.columns 
    WHERE Name      = N'vatRate'
      AND Object_ID = Object_ID(N'pal_Customer'))
BEGIN
    ALTER TABLE pal_Customer
	ALTER COLUMN vatRate DECIMAL(18,2) NULL
END

IF EXISTS(
    SELECT *
    FROM sys.columns 
    WHERE Name      = N'vatRate'
      AND Object_ID = Object_ID(N'pal_Setup'))
BEGIN
    ALTER TABLE pal_Setup
	ALTER COLUMN vatRate DECIMAL(18,2) NULL
END


