You are here

function textimage_schema in Textimage 6.2

Same name and namespace in other branches
  1. 7.3 textimage.install \textimage_schema()
  2. 7.2 textimage.install \textimage_schema()

Implementation of hook_schema().

File

./textimage.install, line 48

Code

function textimage_schema() {
  $schema['textimage_preset'] = array(
    'fields' => array(
      'pid' => array(
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'name' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
      ),
      'description' => array(
        'type' => 'text',
        'size' => 'medium',
        'not null' => TRUE,
      ),
      'settings' => array(
        'type' => 'text',
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'pid',
    ),
  );
  $schema['textimage_image'] = array(
    'fields' => array(
      'pid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'file' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
      ),
      'data' => array(
        'type' => 'text',
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'file',
    ),
  );
  return $schema;
}