Deleted old website field

This commit is contained in:
naomi 2022-06-20 13:55:21 +01:00
parent bca978f6f0
commit 5e0bde90a0
2 changed files with 5 additions and 12 deletions

View File

@ -4,6 +4,11 @@
use \Drupal\Core\Entity\Sql\SqlContentEntityStorageSchemaConverter;
use \Drupal\Core\Field\BaseFieldDefinition;
function opencase_entities_update_90004() {
$update_manager = \Drupal::entityDefinitionUpdateManager();
$definition = $update_manager->getFieldStorageDefinition('website', 'oc_organisation');
$update_manager->uninstallFieldStorageDefinition($definition);
}
function opencase_entities_update_90003() {
$field_storage_definition = BaseFieldDefinition::create('link')

View File

@ -211,23 +211,11 @@ class OCOrganisation extends EditorialContentEntityBase implements OCOrganisatio
'max_length' => 255,
'text_processing' => 0,
));
$fields['website'] = BaseFieldDefinition::create('string')
->setLabel(t('Website'))
->setRevisionable(TRUE)
->setSettings([
'max_length' => 50,
'text_processing' => 0,
])
->setDefaultValue('')
->setDisplayConfigurable('form', true)
->setDisplayConfigurable('view', true)
->setRequired(FALSE);
$fields['org_website'] = BaseFieldDefinition::create('link')
->setLabel(t('Website'))
->setRevisionable(TRUE)
->setSettings([
'max_length' => 50,
'text_processing' => 0,
'title' => 0,
'link_type' => 16