function perfmon_schema in Performance monitor 8
Same name and namespace in other branches
- 7 perfmon.install \perfmon_schema()
Implements hook_schema().
File
- ./
perfmon.install, line 10 - Install, update and uninstall functions for the perfmon module.
Code
function perfmon_schema() {
$schema['perfmon'] = [
'fields' => [
'id' => [
'type' => 'serial',
'not null' => TRUE,
'description' => 'Unique perfmon log record id',
],
'testname' => [
'type' => 'varchar',
'length' => 160,
'not null' => TRUE,
'default' => '',
],
'result' => [
'type' => 'varchar',
'length' => 160,
'not null' => TRUE,
'default' => 0,
],
'lastrun' => [
'type' => 'int',
'not null' => TRUE,
'default' => 0,
],
],
'primary key' => [
'id',
],
'unique keys' => [
'testname' => [
'testname',
],
],
];
$schema['perfmon_test'] = [
'fields' => [
'id' => [
'type' => 'int',
'not null' => TRUE,
'default' => 0,
],
'testname' => [
'type' => 'varchar',
'length' => 160,
'not null' => TRUE,
'default' => 0,
],
'data' => [
'type' => 'varchar',
'length' => 160,
'not null' => TRUE,
'default' => '',
],
],
'primary key' => [
'id',
],
];
return $schema;
}