ALTER TABLE dbo.QX_ATTACHMENT DROP CONSTRAINT FK_QX_ATTACHMENT_QX_USER_TYPE
GO

DROP INDEX dbo.QX_ATTACHMENT.IDX_QX_ATTACHMENT_USER_TYPE
GO

alter table dbo.QX_ATTACHMENT
DROP COLUMN USER_TYPE_ID
GO

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