You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
70 lines
1.4 KiB
70 lines
1.4 KiB
<?php |
|
|
|
/** |
|
* @file |
|
* Install hooks for Islandora Mirador Annotations. |
|
*/ |
|
|
|
/** |
|
* Implements hook_schema(). |
|
*/ |
|
function islandora_mirador_annotations_schema() { |
|
$schema['islandora_mirador_annotation'] = [ |
|
'description' => 'Stores IIIF Web Annotations created in Mirador.', |
|
'fields' => [ |
|
'id' => [ |
|
'type' => 'serial', |
|
'not null' => TRUE, |
|
], |
|
'annotation_key' => [ |
|
'type' => 'varchar', |
|
'length' => 64, |
|
'not null' => TRUE, |
|
], |
|
'annotation_id' => [ |
|
'type' => 'text', |
|
'size' => 'big', |
|
'not null' => TRUE, |
|
], |
|
'canvas_key' => [ |
|
'type' => 'varchar', |
|
'length' => 64, |
|
'not null' => TRUE, |
|
], |
|
'canvas_id' => [ |
|
'type' => 'text', |
|
'size' => 'big', |
|
'not null' => TRUE, |
|
], |
|
'uid' => [ |
|
'type' => 'int', |
|
'unsigned' => TRUE, |
|
'not null' => TRUE, |
|
'default' => 0, |
|
], |
|
'annotation_json' => [ |
|
'type' => 'blob', |
|
'size' => 'big', |
|
'not null' => TRUE, |
|
], |
|
'created' => [ |
|
'type' => 'int', |
|
'not null' => TRUE, |
|
], |
|
'changed' => [ |
|
'type' => 'int', |
|
'not null' => TRUE, |
|
], |
|
], |
|
'primary key' => ['id'], |
|
'unique keys' => [ |
|
'annotation_key' => ['annotation_key'], |
|
], |
|
'indexes' => [ |
|
'canvas_key' => ['canvas_key'], |
|
'uid' => ['uid'], |
|
], |
|
]; |
|
|
|
return $schema; |
|
}
|
|
|