Skip to content

自定义规则说明

hantianwei edited this page Dec 5, 2019 · 1 revision

4、自定规则说明(自1.0.61版本开始支持)

设置了自定义规则,并非所有规则都自定义,只是设置的节点为自定义规则,没有设置节点走默认规则

4.1、说明样例

  • 需要在项目根目录创建文件:AutoDBCheck.yml 内容如下
    mysql:
      existsColumn:
        - columnName: id
          dataType:
          isIndex: 0
        - columnName: created_stime
          dataType: datatime
          isIndex: 0
        - columnName: modified_stime
          dataType: datatime
          isIndex: 0
        - columnName: is_del
          dataType:
          isIndex: 0
      ingoreColumn:
        - gmt_create
        - gmt_modify
        - is_del
        - id
        - as_state
        - audit_state
        - created_stime
        - dealer_name
        - maintain_type
        - service_type
        - state
        - player_name_hash
        - contact_info_hash
        - plate_number_hash
        - company_id
        - appoint_end_time
        - pid
        - cid
        - channel_id
        - order_type
        - check_state
        - spec_state
        - business_type
        - file_type
        - driving_order_type
      ingoreIndex:
        - maintain_clues_data_type_data_union_id
        - idx_dealer_maintain_dealer_id
        - uniq_im_rongcloud_message_msg_timestamp
        - dealer_id
        - unix_as_sign_dealer_dealer_id
      complexSqlJoinQuantity: 30
      primaryKeyStartWith: PRIMARY
      normalIndexNameStartWith: idx_
      uniqueIndexNameStartWith: uniq_
      requiredWhere:
        - is_del,isdel
    
    sqlServer:
      existsColumn:
        - columnName: id
          dataType:
          isIndex: 0
        - columnName: created_stime
          dataType: datatime
          isIndex: 0
        - columnName: modified_stime
          dataType: datatime
          isIndex: 0
        - columnName: is_del
          dataType:
          isIndex: 0
      ingoreColumn:
        - gmt_create
        - gmt_modify
      ingoreIndex:
        - gmt_create
        - gmt_modify
      complexSqlJoinQuantity: 5
      primaryKeyStartWith: PRIMARY
      normalIndexNameStartWith: ix_
      uniqueIndexNameStartWith: uniq_
      requiredWhere:
        - is_del,isdel
Clone this wiki locally