You are here

function xmlsitemap_update_8001 in XML sitemap 2.x

Same name and namespace in other branches
  1. 8 xmlsitemap.install \xmlsitemap_update_8001()

Change the primary key of the 'xmlsitemap' table to include the language.

File

./xmlsitemap.install, line 360
Install, update and uninstall functions for the xmlsitemap module.

Code

function xmlsitemap_update_8001() {
  \Drupal::database()
    ->schema()
    ->dropPrimaryKey('xmlsitemap');
  \Drupal::database()
    ->schema()
    ->addPrimaryKey('xmlsitemap', [
    'id',
    'type',
    'language',
  ]);
  \Drupal::database()
    ->schema()
    ->dropIndex('xmlsitemap', 'language');
}