You are here

function fraction_entity_test_schema in Fraction 7

Implements hook_schema().

File

tests/fraction_entity_test/fraction_entity_test.install, line 6

Code

function fraction_entity_test_schema() {
  $schema = array();
  $schema['fraction_entity_test'] = array(
    'fields' => array(
      'id' => array(
        'description' => 'Fraction Entity Test ID',
        'type' => 'serial',
        'not null' => TRUE,
      ),
      'type' => array(
        'description' => 'Bundle',
        'type' => 'varchar',
        'length' => 100,
        'not null' => TRUE,
      ),
      'time_stamp' => array(
        'description' => 'Timestamp',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
    ),
    'primary key' => array(
      'id',
    ),
  );
  $schema['fraction_entity_test_type'] = array(
    'fields' => array(
      'id' => array(
        'description' => 'Transaction type id',
        'type' => 'serial',
        'not null' => TRUE,
      ),
      'name' => array(
        'description' => 'Machine name',
        'type' => 'varchar',
        'length' => 100,
        'not null' => TRUE,
      ),
      'label' => array(
        'description' => 'Human-readable name',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
      ),
      'status' => array(
        'description' => 'Type status used by Entity API',
        'type' => 'int',
        'size' => 'tiny',
        'not null' => TRUE,
        'default' => 0x1,
      ),
      'module' => array(
        'description' => 'Module owner of type used by Entity API',
        'type' => 'varchar',
        'length' => 100,
        'not null' => FALSE,
      ),
    ),
    'primary key' => array(
      'id',
    ),
    'unique keys' => array(
      'name' => array(
        'name',
      ),
    ),
  );
  return $schema;
}