You are here

function skinr_update_6001 in Skinr 6.2

Install new rule table and add some additional fields to the skinr table.

File

./skinr.install, line 231
skinr.install Contains install, update, and uninstall functions for Skinr.

Code

function skinr_update_6001() {
  $ret = array();
  db_change_field($ret, 'skinr', 'skins', 'skins', array(
    'description' => 'The skins set for this datum.',
    'type' => 'text',
    'size' => 'big',
    'not null' => TRUE,
    'serialize' => TRUE,
  ));
  db_change_field($ret, 'skinr', 'settings', 'settings', array(
    'description' => 'Custom settings for this id.',
    'type' => 'text',
    'size' => 'big',
    'not null' => TRUE,
    'serialize' => TRUE,
    'default' => '',
  ));

  // Add new table for page rules.
  if (!db_table_exists('skinr_rules')) {
    $schema = drupal_get_schema_unprocessed('skinr');
    _drupal_initialize_schema('skinr', $schema);
    db_create_table($ret, 'skinr_rules', $schema['skinr_rules']);
  }
  return $ret;
}