simple_forum-8.x-1.0/simple_forum.install
simple_forum.install
<?php
/**
* @file
* Requirements and update functions for the simple forum module.
*/
/**
* Implements hook_schema().
*/
function simple_forum_schema() {
$schema['simple_forum_comments_rating'] = [
'description' => 'The table for rating the simple forum comments.',
'fields' => [
'id' => [
'description' => 'The primary identifier for rating.',
'type' => 'serial',
'not null' => TRUE,
'unsigned' => TRUE,
],
'uid' => [
'description' => 'Rating user id.',
'type' => 'int',
'length' => 11,
'not null' => TRUE,
'default' => 0,
],
'nid' => [
'description' => 'Rating node id.',
'type' => 'int',
'length' => 11,
'not null' => TRUE,
'default' => 0,
],
'cid' => [
'description' => 'Rating Comments id.',
'type' => 'int',
'length' => 11,
'not null' => TRUE,
'default' => 0,
],
'rating' => [
'description' => 'Comments Rating value.',
'type' => 'int',
'length' => 11,
'not null' => TRUE,
'default' => 0,
],
'status' => [
'description' => 'Rating status.',
'type' => 'int',
'length' => 1,
'not null' => TRUE,
'default' => 1,
],
'rating_date' => [
'description' => 'Rating timestamp.',
'type' => 'int',
'length' => 11,
'not null' => TRUE,
'default' => 1,
],
],
'primary key' => ['id'],
];
return $schema;
}
