Skip to content

The old hook_update_N functions cannot be applied to Backdrop. #20

@AlexShapka

Description

@AlexShapka

After I processed a Drupal 7 module with Coder Update, the module.install file contained the The old hook_update_N functions cannot be applied to Backdrop. message stripping off the function code. Checking the https://api.backdropcms.org/api/backdrop/core%21modules%21system%21system.api.php/function/hook_update_N/1 page doesn't show any deprecation notice.

The original code for the function was:

/**
* Create database on update.
*/

function search_index_update_7100() {
 if (!db_table_exists('search_index_excluded')) {
   $schema['search_index_excluded'] = array(
     'description' => 'The base table for nodes.',
     'fields' => array(
       'nid' => array(
         'description' => 'The primary identifier for a node.',
         'type' => 'serial',
         'unsigned' => TRUE,
         'not null' => TRUE,
       ),
       'type' => array(
         'description' => 'The {node_type} of this node.',
         'type' => 'varchar',
         'length' => 32,
         'not null' => TRUE,
         'default' => '',
       ),
       'title' => array(
         'description' => 'The title of this node, always treated as non-markup plain text.',
         'type' => 'varchar',
         'length' => 255,
         'not null' => TRUE,
         'default' => '',
       ),
     ),
     'primary key' => array(
       'nid',
     ),
   );
  db_create_table('search_index_excluded', $schema['search_index_excluded']);
  }
}

Any suggestions for my case?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions