关于文档里的备份表
2020-05-03 10:40:56
4558次阅读
2个回答
新建一个表,默认规则: 原表名_HIS - 新表字段由原表字段的基础上添加以下字段: - ES_ID_3AE7F1565B82 : 唯一标示的id(主键) - ES_ID_GROUP_3AE7F1565B82:操作分组id,同一次操作多个表,这个字段的值是一样的(guid) - ES_OP_TIME_3AE7F1565B82:操作时间 - ES_OP_USER_3AE7F1565B82:操作用户

- ES_OP_TYPE_3AE7F1565B82:操作类型:A:添加、UA:更新后、UB:更新前、D:删除

我建的业务表是egz_equipment

是不是建egz_equipment_HIS,建上面这个5个字段就可以?每个字段名不需要加上3AE7F1565B82吧?

收藏 0

登录 后回答问题。没有帐号? 注册 一个。

    2020-05-04 09:44:30
    最佳答案

    应该是备份表建错了,严格按帮助来,参照如下:

    2020-05-03 14:37:15
    最佳答案
    2020-05-03 14:35:28,359 [22] ERROR ES.LibraryV2.Web.Handler.ESCommonModule [(null)] - 未处理异常
    System.Exception: egz_equipment:在启用备份功能时遇到下面错误:egz_equipment:表中的字段[NAME]在历史表[egz_equipment_HIS]中不存在

       在 ES.UIV2.WebControl.Form.Service.ESFormService.a(Manifest A_0)
       在 ES.UIV2.WebControl.Form.Service.ESFormService.LoadForm(HttpContext httpContext, String publishId)
       在 ES.UIV2.WebControl.Form.Action.ESFormAction.Process(ESEngineContext engineContext, ESActionContext actionContext)
       在 ES.LibraryV2.Web.Handler.ESBaseHttpHandler.ProcessRequest(HttpContext context)
       在 System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
       在 System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)

       在 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

    操作记录表的结构

    CREATE TABLE `egz_equipment_his`  (
      `ES_ID_3AE7F1565B82` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
      `ES_ID_GROUP_3AE7F1565B82` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '操作分组id',
      `ES_OP_TIME_3AE7F1565B82` datetime(0) NULL DEFAULT NULL COMMENT '操作时间',
      `ES_OP_USER_3AE7F1565B82` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '操作用户',
      `ES_OP_TYPE_3AE7F1565B82` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '操作类型:A:添加、UA:更新后、UB:更新前、D:删除',
      `ID` int(11) NULL DEFAULT NULL,
      `NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '名称',
      `CODE` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
      `W_ID` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
      `EMPLOYEE_ID` int(11) NULL DEFAULT NULL,
      `USER_FLAG` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
      `REMARKS` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
      `VALID_FLAG` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
      `VALID_DATE_FROM` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
      `VALID_DATE_TO` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
      `CREATE_USER_ID` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
      `CREATE_TIME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
      `MODIFY_USER_ID` int(11) NULL DEFAULT NULL,
      `MODIFY_TIME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
      PRIMARY KEY (`ES_ID_3AE7F1565B82`) USING BTREE
    ) ENGINE = MyISAM CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

共2条 1

zhanxueshi

  • 0 回答
  • 0 粉丝
  • 0 关注