function photos_access_schema in Album Photos 6.0.x
Same name and namespace in other branches
- 8.5 photos_access/photos_access.install \photos_access_schema()
- 8.4 photos_access/photos_access.install \photos_access_schema()
- 7.3 photos_access/photos_access.install \photos_access_schema()
Implements hook_schema().
File
- photos_access/
photos_access.install, line 13 - Install, update, and uninstall functions for the Photos Access module.
Code
function photos_access_schema() {
$schema['photos_access_album'] = [
'fields' => [
'id' => [
'type' => 'serial',
'not null' => TRUE,
],
'nid' => [
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
],
'viewid' => [
'type' => 'int',
'size' => 'tiny',
'length' => 1,
'default' => 0,
'description' => '0: Open, 1: Locked, 2: User list, 3: Password',
],
'pass' => [
'type' => 'varchar',
'length' => 128,
'default' => '',
],
],
'indexes' => [
'nid' => [
'nid',
],
],
'primary key' => [
'id',
],
];
$schema['photos_access_user'] = [
'fields' => [
'id' => [
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
],
'uid' => [
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
],
'collaborate' => [
'type' => 'int',
'size' => 'tiny',
'length' => 1,
'default' => 0,
],
],
'indexes' => [
'uid' => [
'uid',
],
],
];
return $schema;
}