You are here

function hierarchical_taxonomy_importer_schema in Hierarchical Taxonomy Import 8

{@inherit_doc}.

File

./hierarchical_taxonomy_importer.install, line 11
This file will contain install and uninstall hooks for hierarchical_taxonomy_importer module.

Code

function hierarchical_taxonomy_importer_schema() {

  // Levels Information Table.
  $schema['hti_term_levels'] = [
    'description' => t('This table captures the levels and offsets to keep track of an existing term.'),
    'fields' => [
      'tid' => [
        'type' => 'int',
        'length' => 10,
        'not null' => TRUE,
        'unsigned' => TRUE,
      ],
      'name' => [
        'type' => 'varchar',
        'length' => '160',
        'not null' => TRUE,
      ],
      'level' => [
        'type' => 'int',
        'not null' => TRUE,
      ],
      'row' => [
        'type' => 'int',
        'not null' => TRUE,
      ],
      'parent' => [
        'type' => 'int',
        'not null' => TRUE,
      ],
    ],
    'primary key' => [
      'tid',
    ],
    'foreign keys' => [
      'hti_term_levels_ibfk' => [
        'table' => 'taxonomy_term_data',
        'columns' => [
          'tid' => 'tid',
        ],
      ],
    ],
  ];
  return $schema;
}