You are here

function mobile_codes_schema in Mobile Codes 6

Same name and namespace in other branches
  1. 6.2 mobile_codes.install \mobile_codes_schema()
  2. 7.2 mobile_codes.install \mobile_codes_schema()

@file

File

./mobile_codes.install, line 8

Code

function mobile_codes_schema() {
  $schema['mobile_codes'] = array(
    'fields' => array(
      'pid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'data' => array(
        'type' => 'text',
        'size' => 'medium',
        'not null' => TRUE,
        'default' => '',
      ),
      'file' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ),
    ),
    'primary key' => array(
      'file',
    ),
  );
  $schema['mobile_codes_presets'] = array(
    'fields' => array(
      'pid' => array(
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'name' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ),
      'data' => array(
        'type' => 'text',
        'size' => 'medium',
        'not null' => TRUE,
        'serialize' => TRUE,
      ),
    ),
    'unique keys' => array(
      'name' => array(
        'name',
      ),
    ),
    'primary key' => array(
      'pid',
    ),
  );
  return $schema;
}