Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
acquia_dam-3499668
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
acquia_dam-3499668
Commits
d31a07ea
Commit
d31a07ea
authored
1 year ago
by
Jakob P
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3381019
: Ensure primary key gets added upon update.
parent
fb33ae77
No related branches found
Branches containing commit
Tags
1.0.10
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
acquia_dam.post_update.php
+11
-0
11 additions, 0 deletions
acquia_dam.post_update.php
with
11 additions
and
0 deletions
acquia_dam.post_update.php
+
11
−
0
View file @
d31a07ea
...
...
@@ -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'
]);
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment