You are here

function mobile_codes_update_7200 in Mobile Codes 7.2

Add 'mobile_codes_blocks' table and add 'extras' column to 'mobile_codes_presets' table.

File

./mobile_codes.install, line 228

Code

function mobile_codes_update_7200() {

  // Add 'mobile_codes_blocks' table.
  db_create_table('mobile_codes_blocks', array(
    'fields' => array(
      'name' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
        'description' => '',
      ),
      'label' => array(
        'type' => 'varchar',
        'length' => 64,
        'not null' => TRUE,
        'default' => '',
        'description' => '',
      ),
      'preset' => array(
        'type' => 'varchar',
        'length' => 255,
        'description' => '',
      ),
      'data' => array(
        'type' => 'text',
        'size' => 'medium',
        'not null' => TRUE,
        'serialize' => TRUE,
        'serialize' => TRUE,
        'description' => '',
      ),
    ),
    'unique keys' => array(
      'name' => array(
        'name',
      ),
    ),
    'primary key' => array(
      'name',
    ),
  ));

  // Add 'extras' column to 'mobile_codes_presets' table.
  db_add_field('mobile_codes_presets', 'extras', array(
    'type' => 'text',
    'size' => 'medium',
    'serialize' => TRUE,
    'description' => '',
  ));
}