UPDATE TBDD_MODULES SET DB_VERSION = '2.5.0.1' where NAME = 'Global-Indexer' 
GO
IF COL_LENGTH('TBGI_HISTORY','ADDED_WHERE') IS NULL
BEGIN
ALTER TABLE TBGI_HISTORY ADD ADDED_WHERE VARCHAR(100) NULL
END
ELSE
PRINT 'COL ADDED_WHERE is existing'
GO