chatwindow-8.x-1.x-dev/chatwindow.install
chatwindow.install
<?php
/**
* Implements hook_schema().
*
* Defines the database tables used by this module.
*
* @see hook_schema()
*
* @ingroup chatwindow
*/
function chatwindow_schema() {
$schema['chatwindow'] = [
'description' => 'Stores chat data',
'fields' => [
'pid' => [
'type' => 'serial',
'not null' => TRUE,
'description' => 'Primary Key: Unique chat ID.',
],
'uid' => [
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'description' => "Creator user's {users}.uid",
],
'chatdata' => [
'type' => 'text',
'not null' => False,
'description' => 'Chat data',
],
'databy' => [
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
'description' => 'user or rasa',
],
'datasenttouser' => [
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'size' => 'tiny',
'description' => '1 or 0',
],
'created' => [
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'description' => 'chat data created record datetime',
]
],
'primary key' => ['pid'],
];
return $schema;
}