Adding new text field to drupal 8 menu I am trying to add a new text field to the menu in Drupal 8, and I have done it using the instruction in the following post:

Add field(s) to menu link?

function my_module_entity_base_field_info(\Drupal\Core\Entity\EntityTypeInterface 
$entity_type) {
  if ($entity_type-&gt;id() === 'menu_link_content') {
    $fields['location'] = BaseFieldDefinition::create('string')
      -&gt;setLabel(t('Location'))
      -&gt;setDisplayOptions('view', ['label' =&gt; 'hidden', 'type' =&gt; 'string', 'weight' =&gt; 0, ])
      -&gt;setDisplayOptions('form', array('type' =&gt; 'string', 'weight' =&gt; 0));

    return $fields;
  }
}


But I am not sure how to go about using hook_update_n to update the schema to reflect this change.

function menu_link_content_update_8201() { 'what do I put here to add the new field that I created'? }


I was able to workaround this issue by manually adding the location column in the mysql db and I can see the field showing up in the menu link editor and able to load and save it just fine in the cms UI.

But then I am not sure how to access this field in the twig file.  

Any help would be grateful.  Thanks!
You only need an update hook if you want that your module can be updated on production sites already using the module. If you write a new module or the module is still in development you can simply reinstall the module. If you have data you want to keep during development use drush entity-updates after changing the code of the installed module.