function system_update_8003 in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/system/system.install \system_update_8003()
 
Change the index on the {router} table.
File
- core/
modules/ system/ system.install, line 1302  - Install, update and uninstall functions for the system module.
 
Code
function system_update_8003() {
  $database = \Drupal::database();
  $database
    ->schema()
    ->dropIndex('router', 'pattern_outline_fit');
  $database
    ->schema()
    ->addIndex('router', 'pattern_outline_parts', [
    'pattern_outline',
    'number_parts',
  ], [
    'fields' => [
      'pattern_outline' => [
        'description' => 'The pattern',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ],
      'number_parts' => [
        'description' => 'Number of parts in this router path.',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
        'size' => 'small',
      ],
    ],
  ]);
}