summaryrefslogtreecommitdiffstats
path: root/core/modules/content_moderation/content_moderation.install
blob: ddeecb5624eef13378e20263dd5c546c2c7a92d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php

/**
 * @file
 * Install, update and uninstall functions for the Content Moderation module.
 */

/**
 * Implements hook_requirements().
 */
function content_moderation_requirements($phase) {
  $requirements = [];
  if ($phase === 'install' && \Drupal::moduleHandler()->moduleExists('workspaces')) {
    $requirements['workspaces_incompatibility'] = [
      'severity' => REQUIREMENT_ERROR,
      'description' => t('Content Moderation can not be installed when Workspaces is also installed.'),
    ];
  }

  return $requirements;
}

/**
 * Remove the 'content_revision_tracker' table.
 */
function content_moderation_update_8401() {
  $database_schema = \Drupal::database()->schema();
  if ($database_schema->tableExists('content_revision_tracker')) {
    $database_schema->dropTable('content_revision_tracker');
  }
}