You are here

function panelizer_update_7103 in Panelizer 7.3

Same name and namespace in other branches
  1. 7.2 panelizer.install \panelizer_update_7103()

Set primary keys to NOT NULL.

File

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

Code

function panelizer_update_7103() {
  $spec = array(
    'description' => 'The type of the entity this panel is attached to.',
    'type' => 'varchar',
    'length' => 128,
    'not null' => TRUE,
  );
  db_change_field('panelizer_entity', 'entity_type', 'entity_type', $spec);
  $spec = array(
    'description' => 'The revision id of the entity.',
    'type' => 'int',
    'unsigned' => TRUE,
    'not null' => TRUE,
  );
  db_change_field('panelizer_entity', 'revision_id', 'revision_id', $spec);
  $spec = array(
    'type' => 'serial',
    'description' => 'The database primary key.',
    'no export' => TRUE,
    'not null' => TRUE,
  );
  db_change_field('panelizer_defaults', 'pnid', 'pnid', $spec);
}