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