-- remove extra columns from INTERACTION table --
ALTER TABLE [dbo].[QW_INTERACTION] DROP COLUMN [qw_laststatuschanged]
ALTER TABLE [dbo].[QW_INTERACTION] DROP COLUMN [qw_quicktemplateid]
ALTER TABLE [dbo].[QW_INTERACTION] DROP COLUMN [qw_isticket]
GO
ALTER TABLE [dbo].[QW_INTERACTION] ADD [qw_action] [int] NULL
GO

-- interaction action taken --
INSERT INTO QW_FIELDINFO (qw_tablename,qw_columnname,qw_columntype,qw_enumvalue,qw_enumlabel) VALUES ('qw_interaction','qw_action',14,0,'Ticket Linked');
INSERT INTO QW_FIELDINFO (qw_tablename,qw_columnname,qw_columntype,qw_enumvalue,qw_enumlabel) VALUES ('qw_interaction','qw_action',14,1,'Resolved By Agent');
GO
CREATE VIEW dbo.QW_DD_INTERACTION_VW AS
	SELECT qw_enumvalue AS pkey, qw_enumlabel AS value
	FROM QW_FIELDINFO
	WHERE (qw_tablename = 'qw_interaction')
		AND (qw_columnname = 'qw_action')
GO

UPDATE QX_SYS_PROP SET PROP_VAL = '028' WHERE (PROP_ID = 'DB_APP_VERSION');