Skip to content

Instantly share code, notes, and snippets.

@rmontero
Created August 9, 2012 21:47
Show Gist options
  • Save rmontero/3308326 to your computer and use it in GitHub Desktop.
Save rmontero/3308326 to your computer and use it in GitHub Desktop.
<?php
function peer_review_install() {
drupal_install_schema('peer_review');
}
function peer_review_uninstall() {
drupal_uninstall_schema('peer_review');
}
function peer_review_schema() {
$schema['peer_review'] = array(
'fields' => array(
'rid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0
),
'nid' => array(
'type' => 'int',
'not null' => TRUE
),
'uid' => array(
'type' => 'int',
'not null' => TRUE
),
'added' => array(
'type' => 'datetime',
'not null' => TRUE
)
),
'indexes' => array(
'nid' => array('nid'),
'uid' => array('uid'),
),
'primary key' => array('rid')
);
return $schema;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment