You are here

function advagg_update_7212 in Advanced CSS/JS Aggregation 7.2

Add use_strict field to advagg_files table.

File

./advagg.install, line 661
Handles Advanced Aggregation installation and upgrade tasks.

Code

function advagg_update_7212() {
  if (!db_field_exists('advagg_files', 'use_strict')) {
    $spec = array(
      'description' => 'If 1 then the js file starts with "use strict";. If 0 then it does not.',
      'type' => 'int',
      'not null' => TRUE,
      'default' => 0,
    );
    db_add_field('advagg_files', 'use_strict', $spec);
  }
  if (!db_index_exists('advagg_files', 'use_strict')) {
    db_add_index('advagg_files', 'use_strict', array(
      'use_strict',
    ));
  }
  return t('The use_strict field has been added to the advagg_files table.');
}