create view dbo.QX_DD_OBJECT_TYPE as
    select
        ENUM_VALUE as PKEY,
        ENUM_LABEL as NAME
    from QX_FIELDINFO
    where (TABLE_NAME = 'qx_inbox') and (COLUMN_NAME = 'object_type')
go

insert into QX_FIELDINFO values ('qx_inbox', 'object_type', 14, 0, 'Interaction')
go
insert into QX_FIELDINFO values ('qx_inbox', 'object_type', 14, 1, 'Case')
go

DECLARE @id int
EXEC dbo.QX_NEXT_KEY 'qx_sys_prop', 1, @id OUTPUT
insert into QX_SYS_PROP values (@id, 'INCOM_EMAIL_INTER_SOURCE', '3', NULL, NULL, 0, 'Interaction email filter source field')
EXEC dbo.QX_NEXT_KEY 'qx_sys_prop', 1, @id OUTPUT
insert into QX_SYS_PROP values (@id, 'INCOM_EMAIL_INTER_DEFAULT_AGENT', '-1000', NULL, NULL, 0, 'Default Email agent – Primary Key of the Agent used in Email processing.')
go

UPDATE QX_SYS_PROP SET PROP_VAL = '042' WHERE (PROP_ID = 'DB_CORE_VERSION');
go