UPDATE TBDD_BASECONFIG SET DB_VERSION = '1.9.8.7';
GO
ALTER TABLE TBEDMI_ITEM_VALUE ALTER COLUMN REFERENCE_GUID NVARCHAR(250);  
GO  
ALTER TABLE TBEDMI_ITEM_VALUE ALTER COLUMN ITEM_DESCRIPTION NVARCHAR(250);  
GO  
ALTER TABLE TBEDMI_ITEM_VALUE ALTER COLUMN ITEM_VALUE NVARCHAR(4000);  
GO  
ALTER TABLE TBEDMI_ITEM_VALUE ALTER COLUMN CREATEDWHO NVARCHAR(100);  
GO  
ALTER TABLE TBEDMI_ITEM_VALUE ALTER COLUMN SPEC_NAME NVARCHAR(100);  
GO
IF EXISTS (SELECT * FROM Information_Schema.Columns WHERE Table_Name = 'TBEDMI_ITEM_VALUE' AND Column_Name = 'CHANGED_WHO')
	EXEC sp_rename 'dbo.TBEDMI_ITEM_VALUE.CHANGED_WHO', 'CHANGEDWHO', 'COLUMN';

ALTER TABLE TBEDMI_ITEM_VALUE ALTER COLUMN CREATEDWHO NVARCHAR(100);  
GO  

