You are here

function media_watermark_schema in Media watermark 7

Implements hook_schema().

File

./media_watermark.install, line 12
Media watermark module install file.

Code

function media_watermark_schema() {
  $schema['media_watermark'] = array(
    'description' => 'Watermark elements',
    'fields' => array(
      'wid' => array(
        'type' => 'serial',
        'unsigned' => TRUE,
        'size' => 'normal',
        'not null' => TRUE,
        'description' => 'Watermark id',
      ),
      'fid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'size' => 'normal',
        'not null' => TRUE,
        'description' => 'Watermark file id',
      ),
      'name' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'description' => 'Watermark Name',
      ),
      'hor_position' => array(
        'type' => 'varchar',
        'length' => 20,
        'not null' => TRUE,
        'description' => 'Horizontal position',
      ),
      'ver_position' => array(
        'type' => 'varchar',
        'length' => 20,
        'not null' => TRUE,
        'description' => 'Vertical position',
      ),
      'hor_margin' => array(
        'type' => 'varchar',
        'length' => 20,
        'not null' => TRUE,
        'description' => 'Horizontal margin',
      ),
      'ver_margin' => array(
        'type' => 'varchar',
        'length' => 20,
        'not null' => TRUE,
        'description' => 'Vertical margin',
      ),
    ),
    'primary key' => array(
      'wid',
    ),
  );
  return $schema;
}