function node_update_7010

Add the {block_node_type} table.

Related topics

File

modules/node/node.install, line 819

Code

function node_update_7010() {
    $schema['block_node_type'] = array(
        'description' => 'Sets up display criteria for blocks based on content types',
        'fields' => array(
            'module' => array(
                'type' => 'varchar',
                'length' => 64,
                'not null' => TRUE,
                'description' => "The block's origin module, from {block}.module.",
            ),
            'delta' => array(
                'type' => 'varchar',
                'length' => 32,
                'not null' => TRUE,
                'description' => "The block's unique delta within module, from {block}.delta.",
            ),
            'type' => array(
                'type' => 'varchar',
                'length' => 32,
                'not null' => TRUE,
                'description' => "The machine-readable name of this type from {node_type}.type.",
            ),
        ),
        'primary key' => array(
            'module',
            'delta',
            'type',
        ),
        'indexes' => array(
            'type' => array(
                'type',
            ),
        ),
    );
    db_create_table('block_node_type', $schema['block_node_type']);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.