You are here

function progress_schema in Background Process 8

Implemets Progress Schema.

File

progress/progress.install, line 11
Installation file for the Progress module.

Code

function progress_schema() {
  $schema = [];
  $schema['progress'] = [
    'description' => 'Progress',
    'fields' => [
      'name' => [
        'description' => 'Name of progress',
        'type' => 'varchar_ascii',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ],
      'progress' => [
        'description' => 'Progress status',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => 0,
      ],
      'message' => [
        'description' => 'Message for current progress',
        'type' => 'text',
        'not null' => TRUE,
      ],
      'start_stamp' => [
        'description' => 'Start time in unix timestamp',
        'type' => 'float',
        'size' => 'big',
        'not null' => TRUE,
        'default' => 0,
      ],
      'end_stamp' => [
        'description' => 'End time in unix timestamp',
        'type' => 'float',
        'size' => 'big',
        'not null' => TRUE,
        'default' => 0,
      ],
      'current_stamp' => [
        'description' => 'Current time in unix timestamp',
        'type' => 'float',
        'size' => 'big',
        'not null' => TRUE,
        'default' => 0,
      ],
    ],
    'primary key' => [
      'name',
    ],
  ];
  return $schema;
}