function rate_schema in Rate 8.2
Same name and namespace in other branches
- 8 rate.install \rate_schema()
- 7.2 rate.install \rate_schema()
- 7 rate.install \rate_schema()
Implements hook_schema().
File
- ./
rate.install, line 14 - Installation/Uninstallation functions for rate module.
Code
function rate_schema() {
$schema = [];
$schema['rate_bot_agent'] = [
'fields' => [
'id' => [
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
],
'pattern' => [
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
],
],
'primary key' => [
'id',
],
];
$schema['rate_bot_ip'] = [
'fields' => [
'id' => [
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
],
'ip' => [
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
],
],
'primary key' => [
'id',
],
];
return $schema;
}