You are here

function panelizer_update_7113 in Panelizer 7.3

Make {panelizer_entity}.view_mode NOT NULL.

File

./panelizer.install, line 661
Install, update and uninstall functions for the panelizer module.

Code

function panelizer_update_7113() {
  db_drop_primary_key('panelizer_entity');
  $spec = array(
    'description' => 'Contains the view mode this panelizer is for.',
    'type' => 'varchar',
    'length' => '128',
    'not null' => TRUE,
  );
  $keys = array(
    'primary key' => array(
      'entity_type',
      'entity_id',
      'revision_id',
      'view_mode',
    ),
  );
  db_change_field('panelizer_entity', 'view_mode', 'view_mode', $spec, $keys);
}