-- 删除无用字段，在中间库执行
DELETE FROM xwcmdbfieldinfo WHERE TABLENAME = 'originaldocument' AND FIELDNAME = 'PublishChannel';
DELETE FROM xwcmviewfieldinfo WHERE TABLENAME = 'originaldocument' AND DBFIELDNAME = 'PublishChannel';
DELETE FROM xwcmdbfieldinfo WHERE TABLENAME = 'originaldocument' AND FIELDNAME = 'SysTime';
DELETE FROM xwcmviewfieldinfo WHERE TABLENAME = 'originaldocument' AND DBFIELDNAME = 'SysTime';
DELETE FROM xwcmdbfieldinfo WHERE TABLENAME = 'originaldocument' AND FIELDNAME = 'xgdm';
DELETE FROM xwcmviewfieldinfo WHERE TABLENAME = 'originaldocument' AND DBFIELDNAME = 'xgdm';
DELETE FROM xwcmdbfieldinfo WHERE TABLENAME = 'originaldocument' AND FIELDNAME = 'OnlineSurvey';
DELETE FROM xwcmviewfieldinfo WHERE TABLENAME = 'originaldocument' AND DBFIELDNAME = 'OnlineSurvey';
DELETE FROM xwcmdbfieldinfo WHERE TABLENAME = 'originaldocument' AND FIELDNAME = 'imgtype';
DELETE FROM xwcmviewfieldinfo WHERE TABLENAME = 'originaldocument' AND DBFIELDNAME = 'imgtype';
DELETE FROM xwcmdbfieldinfo WHERE TABLENAME = 'originaldocument' AND FIELDNAME = 'zwyb';
DELETE FROM xwcmviewfieldinfo WHERE TABLENAME = 'originaldocument' AND DBFIELDNAME = 'zwyb';
DELETE FROM xwcmdbfieldinfo WHERE TABLENAME = 'originaldocument' AND FIELDNAME = 'label';
DELETE FROM xwcmviewfieldinfo WHERE TABLENAME = 'originaldocument' AND DBFIELDNAME = 'label';
DELETE FROM xwcmdbfieldinfo WHERE TABLENAME = 'originaldocument' AND FIELDNAME = 'PaperType2';
DELETE FROM xwcmviewfieldinfo WHERE TABLENAME = 'originaldocument' AND DBFIELDNAME = 'PaperType2';
DELETE FROM xwcmdbfieldinfo WHERE TABLENAME = 'originaldocument' AND FIELDNAME = 'mapid';
DELETE FROM xwcmviewfieldinfo WHERE TABLENAME = 'originaldocument' AND DBFIELDNAME = 'mapid';
DELETE FROM xwcmdbfieldinfo WHERE TABLENAME = 'originaldocument' AND FIELDNAME = 'address';
DELETE FROM xwcmviewfieldinfo WHERE TABLENAME = 'originaldocument' AND DBFIELDNAME = 'address';
DELETE FROM xwcmdbfieldinfo WHERE TABLENAME = 'originaldocument' AND FIELDNAME = 'saddress';
DELETE FROM xwcmviewfieldinfo WHERE TABLENAME = 'originaldocument' AND DBFIELDNAME = 'saddress';
DELETE FROM xwcmdbfieldinfo WHERE TABLENAME = 'originaldocument' AND FIELDNAME = 'stel';
DELETE FROM xwcmviewfieldinfo WHERE TABLENAME = 'originaldocument' AND DBFIELDNAME = 'stel';
DELETE FROM xwcmdbfieldinfo WHERE TABLENAME = 'originaldocument' AND FIELDNAME = 'phototype';
DELETE FROM xwcmviewfieldinfo WHERE TABLENAME = 'originaldocument' AND DBFIELDNAME = 'phototype';
DELETE FROM xwcmdbfieldinfo WHERE TABLENAME = 'originaldocument' AND FIELDNAME = 'test2';
DELETE FROM xwcmviewfieldinfo WHERE TABLENAME = 'originaldocument' AND DBFIELDNAME = 'test2';
DELETE FROM xwcmdbfieldinfo WHERE TABLENAME = 'originaldocument' AND FIELDNAME = 'ctime2';
DELETE FROM xwcmviewfieldinfo WHERE TABLENAME = 'originaldocument' AND DBFIELDNAME = 'ctime2';
DELETE FROM xwcmdbfieldinfo WHERE TABLENAME = 'originaldocument' AND FIELDNAME = 'documentType';
DELETE FROM xwcmviewfieldinfo WHERE TABLENAME = 'originaldocument' AND DBFIELDNAME = 'documentType';
DELETE FROM xwcmdbfieldinfo WHERE TABLENAME = 'originaldocument' AND FIELDNAME = 'videoAppendix';
DELETE FROM xwcmviewfieldinfo WHERE TABLENAME = 'originaldocument' AND DBFIELDNAME = 'videoAppendix';
DELETE FROM xwcmdbfieldinfo WHERE TABLENAME = 'originaldocument' AND FIELDNAME = 'imageAppendix';
DELETE FROM xwcmviewfieldinfo WHERE TABLENAME = 'originaldocument' AND DBFIELDNAME = 'imageAppendix';
DELETE FROM xwcmdbfieldinfo WHERE TABLENAME = 'originaldocument' AND FIELDNAME = 'idxID';
DELETE FROM xwcmviewfieldinfo WHERE TABLENAME = 'originaldocument' AND DBFIELDNAME = 'idxID';
DELETE FROM xwcmdbfieldinfo WHERE TABLENAME = 'originaldocument' AND FIELDNAME = 'RidxId';
DELETE FROM xwcmviewfieldinfo WHERE TABLENAME = 'originaldocument' AND DBFIELDNAME = 'RidxId';
DELETE FROM xwcmdbfieldinfo WHERE TABLENAME = 'originaldocument' AND FIELDNAME = 'Rtitle';
DELETE FROM xwcmviewfieldinfo WHERE TABLENAME = 'originaldocument' AND DBFIELDNAME = 'Rtitle';
DELETE FROM xwcmdbfieldinfo WHERE TABLENAME = 'originaldocument' AND FIELDNAME = 'fileNum';
DELETE FROM xwcmviewfieldinfo WHERE TABLENAME = 'originaldocument' AND DBFIELDNAME = 'fileNum';
DELETE FROM xwcmdbfieldinfo WHERE TABLENAME = 'originaldocument' AND FIELDNAME = 'placekey';
DELETE FROM xwcmviewfieldinfo WHERE TABLENAME = 'originaldocument' AND DBFIELDNAME = 'placekey';
DELETE FROM xwcmdbfieldinfo WHERE TABLENAME = 'originaldocument' AND FIELDNAME = 'subcat';
DELETE FROM xwcmviewfieldinfo WHERE TABLENAME = 'originaldocument' AND DBFIELDNAME = 'subcat';
DELETE FROM xwcmdbfieldinfo WHERE TABLENAME = 'originaldocument' AND FIELDNAME = 'themecat';
DELETE FROM xwcmviewfieldinfo WHERE TABLENAME = 'originaldocument' AND DBFIELDNAME = 'themecat';
DELETE FROM xwcmdbfieldinfo WHERE TABLENAME = 'originaldocument' AND FIELDNAME = 'organcat';
DELETE FROM xwcmviewfieldinfo WHERE TABLENAME = 'originaldocument' AND DBFIELDNAME = 'organcat';
DELETE FROM xwcmdbfieldinfo WHERE TABLENAME = 'originaldocument' AND FIELDNAME = 'IntroPage';
DELETE FROM xwcmviewfieldinfo WHERE TABLENAME = 'originaldocument' AND DBFIELDNAME = 'IntroPage';
DELETE FROM xwcmdbfieldinfo WHERE TABLENAME = 'originaldocument' AND FIELDNAME = 'SysTime';
DELETE FROM xwcmviewfieldinfo WHERE TABLENAME = 'originaldocument' AND DBFIELDNAME = 'SysTime';
DELETE FROM xwcmdbfieldinfo WHERE TABLENAME = 'originaldocument' AND FIELDNAME = 'scm';
DELETE FROM xwcmviewfieldinfo WHERE TABLENAME = 'originaldocument' AND DBFIELDNAME = 'scm';
DELETE FROM xwcmdbfieldinfo WHERE TABLENAME = 'originaldocument' AND FIELDNAME = 'RelGroupPhoto';
DELETE FROM xwcmviewfieldinfo WHERE TABLENAME = 'originaldocument' AND DBFIELDNAME = 'RelGroupPhoto';
DELETE FROM xwcmdbfieldinfo WHERE TABLENAME = 'originaldocument' AND FIELDNAME = 'wydc';
DELETE FROM xwcmviewfieldinfo WHERE TABLENAME = 'originaldocument' AND DBFIELDNAME = 'wydc';
DELETE FROM xwcmdbfieldinfo WHERE TABLENAME = 'originaldocument' AND FIELDNAME = 'RelTxt';
DELETE FROM xwcmviewfieldinfo WHERE TABLENAME = 'originaldocument' AND DBFIELDNAME = 'RelTxt';

alter table wcmmetatableoriginaldocument
    drop column PublishChannel,
    drop column SysTime,
    drop column xgdm,
    drop column OnlineSurvey,
    drop column imgtype,
    drop column zwyb,
    drop column label,
    drop column PaperType2,
    drop column mapid,
    drop column address,
    drop column saddress,
    drop column stel,
    drop column phototype,
    drop column test2,
    drop column ctime2,
    drop column documentType,
    drop column videoAppendix,
    drop column imageAppendix,
    drop column idxID,
    drop column RidxId,
    drop column Rtitle,
    drop column fileNum,
    drop column placekey,
    drop column subcat,
    drop column themecat,
    drop column organcat,
    drop column IntroPage,
    drop column SysTime,
    drop column _MASK_FROM_V2,
    drop column Scm;
