You are here

function minisite_update_8001 in Mini site 8

Adds 'filemime' and 'filesize' and removes `entity_rid` columns.

File

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

Code

function minisite_update_8001() {
  $schema = Database::getConnection()
    ->schema();
  $spec = [
    'description' => 'The file MIME of the asset.',
    'type' => 'varchar',
    'length' => 255,
    'not null' => FALSE,
    'default' => NULL,
  ];
  $schema
    ->addField('minisite_asset', 'filemime', $spec);
  $spec = [
    'description' => 'The file size of the asset.',
    'type' => 'int',
    'size' => 'big',
    'length' => 20,
    'unsigned' => TRUE,
    'not null' => FALSE,
    'default' => NULL,
  ];
  $schema
    ->addField('minisite_asset', 'filesize', $spec);
  $schema
    ->dropField('minisite_asset', 'entity_rid');
}