You are here

function content_theme_update_6101 in Content Theme 7

Same name and namespace in other branches
  1. 6 content_theme.install \content_theme_update_6101()
  2. 7.2 content_theme.install \content_theme_update_6101()

Add content node theme ID field and updates table indices.

File

./content_theme.install, line 88
Install, update and uninstall functions for the content_theme module.

Code

function content_theme_update_6101() {
  db_drop_primary_key('content_theme_node');
  db_add_field('content_theme_node', 'ctnid', array(
    'type' => 'serial',
    'unsigned' => TRUE,
    'not null' => TRUE,
  ), array(
    'primary key' => array(
      'ctnid',
    ),
  ));
  db_add_unique_key('content_theme_node', 'node_action', array(
    'nid',
    'action',
  ));
  db_add_index('content_theme_node', 'list', array(
    'nid',
    'action',
    'theme',
  ));
}