You are here

function opigno_tour_schema in Opigno tour 3.x

Same name and namespace in other branches
  1. 8 opigno_tour.install \opigno_tour_schema()

Opigno Tour table.

File

./opigno_tour.install, line 14
Opigno Tour module install/uninstall functions.

Code

function opigno_tour_schema() {
  $schema['opigno_tour_user_routes'] = [
    'description' => 'Stores PM thread delete time data.',
    'fields' => [
      'id' => [
        'type' => 'serial',
        'not null' => TRUE,
        'description' => 'Primary Key: Unique delete ID.',
      ],
      'uid' => [
        'description' => 'User ID',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ],
      'route' => [
        'description' => 'Route ID',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ],
      'timestamp' => [
        'description' => 'Time of page viewed',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ],
    ],
    'primary key' => [
      'id',
    ],
    'indexes' => [
      'uid_route' => [
        'uid',
        'route',
      ],
    ],
  ];
  return $schema;
}