UPDATE TBDD_MODULES SET DB_VERSION = '1.9.8.5' where NAME = 'Global-Indexer' 
GO
ALTER TABLE TBDD_INDEX_MAN ADD MULTISELECT BIT NOT NULL DEFAULT 0
GO 
ALTER VIEW [dbo].[VWDDINDEX_MAN]
AS
SELECT TOP 2000
     T.GUID,
     T.NAME		INDEXNAME,
	 T.WD_INDEX,
	 T.MULTISELECT,
     T.COMMENT,
     T.DATATYPE,
     T.DOK_ID,
     T1.BEZEICHNUNG	    DOKUMENTART,
     T1.KURZNAME,
     T.SUGGESTION,
     T.CONNECTION_ID,
     T2.BEZEICHNUNG		CONNECTION,
     T2.SQL_PROVIDER,
     T2.SERVER,
     T2.DATENBANK,
     T2.USERNAME,
     T2.PASSWORD,
     T.SQL_RESULT,
     T.SQL_CHECK,
	 T.OPTIONAL,
	 T.SAVE_VALUE
FROM
	 TBDD_INDEX_MAN				T
	 INNER JOIN TBDD_DOKUMENTART	T1 ON T.DOK_ID = T1.GUID AND T1.AKTIV = 1
	 LEFT  JOIN TBDD_CONNECTION	T2 ON T.CONNECTION_ID = T2.GUID	AND T2.AKTIV = 1
WHERE
	T.ACTIVE = 1
ORDER BY
	 T.DOK_ID,
	 T.GUID
GO
IF COL_LENGTH('TBDD_INDEX_MAN','VKT_ADD_ITEM') IS NULL
BEGIN
ALTER TABLE TBDD_INDEX_MAN
    ADD [VKT_ADD_ITEM] BIT NOT NULL DEFAULT 0
END
GO 
IF COL_LENGTH('TBDD_INDEX_MAN','VKT_PREVENT_MULTIPLE_VALUES') IS NULL
BEGIN
ALTER TABLE TBDD_INDEX_MAN
    ADD [VKT_PREVENT_MULTIPLE_VALUES] BIT NOT NULL DEFAULT 1
END
GO
