Skip to content
Snippets Groups Projects
Commit d31a07ea authored by Jakob P's avatar Jakob P
Browse files

Issue #3381019: Ensure primary key gets added upon update.

parent fb33ae77
No related branches found
Tags 1.0.10
No related merge requests found
......@@ -9,6 +9,7 @@ declare(strict_types=1);
use Drupal\acquia_dam\Entity\MediaSourceField;
use Drupal\acquia_dam\Plugin\Field\FieldType\AssetItem;
use Drupal\Core\Database\Database;
/**
* Populate the external_id field.
......@@ -70,3 +71,13 @@ function acquia_dam_post_update_existing_media_external_id_field(&$sandbox) {
function acquia_dam_post_update_add_crop_new_asset_version_subscriber(&$sandbox) {
// Empty post_update hook to rebuild service container.
}
/**
* Implements hook_post_update_NAME().
*/
function acquia_dam_post_update_link_tracking_primary_key(&$sandbox) {
$schema = Database::getConnection()->schema();
if (!$schema->indexExists('acquia_dam_integration_link_tracking', 'PRIMARY')) {
$schema->addPrimaryKey('acquia_dam_integration_link_tracking', ['entity_uuid']);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment