Commit d4e3b3c6 authored by Seamus Lee's avatar Seamus Lee Committed by renatog
Browse files

Issue #3254883 by seamus_lee, RenatoG, dale42: Missing field schema for changed field on upgrade

parent 78ab2f26
Loading
Loading
Loading
Loading
+10 −0
Changes for invite.install: 10 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@
 * Install, update and uninstall functions for the Invite.
 */

use Drupal\Core\Field\BaseFieldDefinition;
use Drupal\Core\Url;

/**
@@ -20,3 +21,12 @@ function invite_install() {
    '@url' => Url::fromRoute('invite.invite_config')->toString(),
  ]));
}

/**
 * Insure the Invite entity Changed field exists in the database.
 */
function invite_update_8101() {
  $field_storage_definition = BaseFieldDefinition::create('changed')->setLabel(t('Changed'))->setDescription(t('The time that the entity was last edited.'));

  \Drupal::entityDefinitionUpdateManager()->installFieldStorageDefinition('changed', 'invite', 'invite', $field_storage_definition);
}