You are here

function minisite_field_schema in Mini site 7

Implements hook_field_schema().

File

./minisite.install, line 171
Contains install and update functions for Minisite.

Code

function minisite_field_schema($field) {
  return [
    'columns' => [
      'fid' => [
        'description' => 'The {file_managed}.fid being referenced in minisite field.',
        'type' => 'int',
        'not null' => FALSE,
        'unsigned' => TRUE,
      ],
      'site_path' => [
        'type' => 'varchar',
        'length' => 255,
        'not null' => FALSE,
      ],
      'data' => [
        'type' => 'text',
        'not null' => FALSE,
        'size' => 'big',
        'serialize' => TRUE,
        'description' => 'Used for storing additional information.',
      ],
    ],
    'indexes' => [
      'fid' => [
        'fid',
      ],
    ],
    'foreign keys' => [
      'fid' => [
        'table' => 'file_managed',
        'columns' => [
          'fid' => 'fid',
        ],
      ],
    ],
  ];
}