Skip to content

Commit

Permalink
repairs
Browse files Browse the repository at this point in the history
  • Loading branch information
qadan committed Aug 5, 2020
1 parent 3b1e2a6 commit ad63c0a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
15 changes: 5 additions & 10 deletions embargoes.install
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ function embargoes_schema() {
],
'action' => [
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
],
'node' => [
Expand Down Expand Up @@ -63,16 +62,12 @@ function embargoes_update_8001(&$sandbox) {
}

/**
* Update the 'action' column to use integers. Add indices.
* Add indices.
*/
function embargoes_update_8002(&$sandbox) {
$schema = Database::getConnection()->schema();
$schema->changeField('embargoes_log', 'action', 'action', [
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
]);
$schema->addIndex('embargoes_log', 'action', ['action']);
$schema->addIndex('embargoes_log', 'uid', ['uid']);
$schema->addIndex('embargoes_log', 'node', ['node']);
$embargoes_schema = embargoes_schema();
$schema->addIndex('embargoes_log', 'action', ['action'], $embargoes_schema['embargoes_log']);
$schema->addIndex('embargoes_log', 'uid', ['uid'], $embargoes_schema['embargoes_log']);
$schema->addIndex('embargoes_log', 'node', ['node'], $embargoes_schema['embargoes_log']);
}
2 changes: 1 addition & 1 deletion src/Entity/EmbargoesEmbargoEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ public function setNotificationStatus($status) {
* {@inheritdoc}
*/
public function getCacheTagsToInvalidate() {
$tags = parent::getCacheTagsToInvalidate[];
$tags = parent::getCacheTagsToInvalidate();
$tags[] = "node:{$this->getEmbargoedNode()}";
return $tags;
}
Expand Down

0 comments on commit ad63c0a

Please sign in to comment.