You are here

function js_injector_schema in JS injector 6

Same name and namespace in other branches
  1. 6.2 js_injector.install \js_injector_schema()
  2. 7.2 js_injector.install \js_injector_schema()
  3. 7 js_injector.install \js_injector_schema()

Implementation of hook_schema().

File

./js_injector.install, line 14

Code

function js_injector_schema() {
  $schema['js_injector_rule'] = array(
    'fields' => array(
      'crid' => array(
        'description' => 'The primary identifier for the js injection rule',
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'title' => array(
        'description' => 'The descriptive title of the js injection rule',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
      ),
      'rule_type' => array(
        'description' => 'The type of rule to use when determining if the js should be injected',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'rule_conditions' => array(
        'description' => 'The data to evaluate when determining if the js should be injected',
        'type' => 'text',
        'not null' => TRUE,
      ),
      'scope' => array(
        'description' => 'The scope type of the js file (header, footer, etc.)',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
      ),
      'preprocess' => array(
        'description' => 'Whether the js file should be included by the js preprocessor',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'cache' => array(
        'description' => 'Whether the js file should be cahed by the js cache',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'file_path' => array(
        'description' => 'The path of the js file to inject',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'crid',
    ),
  );
  return $schema;
}