function workbench_workflows_starter_schema in Workbench Moderation 7.2
Helper function for defining schema.
1 call to workbench_workflows_starter_schema()
- workbench_workflows_schema in modules/
workbench_workflows/ workbench_workflows.install - Implements hook_schema().
File
- modules/
workbench_workflows/ workbench_workflows.install, line 98 - Database functions for workbench_workflows.
Code
function workbench_workflows_starter_schema($type) {
$plural = $type . 's';
$schema = array(
"description" => "Contains exportable customized {$plural}.",
"export" => array(
"identifier" => "{$type}",
"bulk export" => TRUE,
"primary key" => $type . "id",
"api" => array(
"owner" => "workbench_workflows",
"api" => "workbench_workflows",
"minimum_version" => 1,
"current_version" => 1,
),
),
"fields" => array(
$type . "id" => array(
"type" => "serial",
"description" => "A database primary key to ensure uniqueness",
"not null" => TRUE,
"no export" => TRUE,
),
"name" => array(
"type" => "varchar",
"length" => "255",
"description" => "Unique ID for this {$type}. Used to identify it programmatically.",
),
"editor_title" => array(
"type" => "varchar",
"length" => "255",
"description" => "Administrative title for this {$type}.",
),
"admin_title" => array(
"type" => "varchar",
"length" => "255",
"description" => "Administrative title for this {$type}.",
),
"admin_description" => array(
"type" => "text",
"size" => "big",
"description" => "Administrative description for this {$type}.",
"object default" => "",
),
"requiredcontexts" => array(
"type" => "text",
"size" => "big",
"description" => "Any required contexts for this {$type}.",
"serialize" => TRUE,
"object default" => array(),
),
"contexts" => array(
"type" => "text",
"size" => "big",
"description" => "Any embedded contexts for this {$type}.",
"serialize" => TRUE,
"object default" => array(),
),
"relationships" => array(
"type" => "text",
"size" => "big",
"description" => "Any relationships for this {$type}.",
"serialize" => TRUE,
"object default" => array(),
),
"access" => array(
"type" => "text",
"size" => "big",
"description" => "The actual group of access plugins for this {$type}.",
"serialize" => TRUE,
"object default" => array(),
),
'weight' => array(
'type' => 'int',
'description' => 'Weight',
),
),
"primary key" => array(
$type . "id",
),
'unique keys' => array(
'name' => array(
'name',
),
),
);
return $schema;
}