anchor.diff:    ENDMETHOD.
   
   
  -  METHOD migrate_setting.
  -
  -    DATA: li_element            TYPE REF TO if_ixml_element,
  -          ls_setting_to_migrate LIKE LINE OF ct_settings_to_migrate.
  -
  -    li_element = ci_document->find_from_name( iv_name ).
  -    IF li_element IS BOUND.
  -
  -      " The element is present in the global config.
  -      " Therefore we have to migrate it
  -
  -      ls_setting_to_migrate-name = iv_name.
  -      ls_setting_to_migrate-value = li_element->get_value( ).
  -      INSERT ls_setting_to_migrate INTO TABLE ct_settings_to_migrate.
  -
  -      li_element->remove_node( ).
  -
  -    ENDIF.
  -
  -  ENDMETHOD.
  -
  -
  -  METHOD migrate_settings.
  -
  -    DATA: li_global_settings_document TYPE REF TO if_ixml_document,
  -          lt_settings_to_migrate      TYPE ty_settings_to_migrate,
  -          lx_error                    TYPE REF TO zcx_abapgit_not_found.
  -
  -    " migrate global settings to user specific settings
  -
  -    TRY.
  -        li_global_settings_document = get_global_settings_document( ).
  -
  -      CATCH zcx_abapgit_not_found INTO lx_error.
  -        " No global settings available, nothing todo.
  -        RETURN.
  -    ENDTRY.
  -
  -    migrate_setting(
  -      EXPORTING
  -        iv_name                = |MAX_LINES|
  -      CHANGING
  -        ct_settings_to_migrate = lt_settings_to_migrate
  -        ci_document            = li_global_settings_document ).
  -
  -    migrate_setting(
  -      EXPORTING
  -        iv_name                = |ADT_JUMP_ENABLED|
  -      CHANGING
  -        ct_settings_to_migrate = lt_settings_to_migrate
  -        ci_document            = li_global_settings_document ).
  -
  -    IF lines( lt_settings_to_migrate ) > 0.
  -
  -      distribute_settings_to_users( lt_settings_to_migrate ).
  -
  -      update_global_settings( li_global_settings_document ).
  -
  -    ENDIF.
  -
  -  ENDMETHOD.
  -
  -
  -  METHOD read_global_settings_xml.
  -
  -    rv_global_settings_xml = zcl_abapgit_persistence_db=>get_instance( )->read(
  -        iv_type  = zcl_abapgit_persistence_db=>c_type_settings
  -        iv_value = '' ).
  -
  -  ENDMETHOD.
  -
  -
     METHOD run.
   
       IF table_exists( ) = abap_false.
  
positive.code: 
    ENDMETHOD.
  
  
    METHOD update_global_settings.
  
      DATA: li_ixml          TYPE REF TO if_ixml,
            lv_settings_xml  TYPE string,
            li_ostream       TYPE REF TO if_ixml_ostream,
            li_renderer      TYPE REF TO if_ixml_renderer,
            li_streamfactory TYPE REF TO if_ixml_stream_factory.
  
      " finally update global settings
      " migrated elements are already removed from document
  
      li_ixml = cl_ixml=>create( ).
      li_streamfactory = li_ixml->create_stream_factory( ).
      li_ostream = li_streamfactory->create_ostream_cstring( lv_settings_xml ).
      li_renderer = li_ixml->create_renderer( ostream  = li_ostream
                                              document = ii_document ).
      li_renderer->render( ).
  
      zcl_abapgit_persistence_db=>get_instance( )->update(
        iv_type  = zcl_abapgit_persistence_db=>c_type_settings
        iv_value = ''
        iv_data  = lv_settings_xml ).
  
    ENDMETHOD.
  ENDCLASS.
  
negative.code: 
    PROTECTED SECTION.
    PRIVATE SECTION.
      CONSTANTS c_text TYPE string VALUE 'Generated by abapGit' ##NO_TEXT.
  
      CLASS-METHODS table_create
        RAISING
          zcx_abapgit_exception.
      CLASS-METHODS table_exists
        RETURNING
          VALUE(rv_exists) TYPE abap_bool.
      CLASS-METHODS lock_create
        RAISING
          zcx_abapgit_exception.
      CLASS-METHODS lock_exists
        RETURNING
          VALUE(rv_exists) TYPE abap_bool.
  
  ENDCLASS.
  
  
  
  CLASS zcl_abapgit_persist_migrate IMPLEMENTATION.
  
  
    METHOD lock_create.
  