You are here

function commerce_license_update_7103 in Commerce License 7

Add the 'revision_uid' and 'log' columns to the commerce_license_revision table.

File

./commerce_license.install, line 361

Code

function commerce_license_update_7103() {
  if (!db_field_exists('commerce_license_revision', 'revision_uid')) {
    db_add_field('commerce_license_revision', 'revision_uid', array(
      'description' => 'The {users}.uid of the user who created the revision.',
      'type' => 'int',
      'unsigned' => TRUE,
      'not null' => FALSE,
      'default' => NULL,
    ));
  }
  if (!db_field_exists('commerce_license_revision', 'log')) {
    db_add_field('commerce_license_revision', 'log', array(
      'description' => 'The log entry explaining the changes in this revision.',
      'type' => 'text',
      'not null' => FALSE,
      'size' => 'big',
      'default' => NULL,
    ));
  }
}