View source
<?php
function w3c_validator_install() {
drupal_install_schema('w3c_validator');
}
function w3c_validator_uninstall() {
drupal_uninstall_schema('w3c_validator');
}
function w3c_validator_schema() {
$schema = array();
$schema['validator_access_tokens'] = array(
'fields' => array(
'id' => array(
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
'disp-width' => '11',
),
'token' => array(
'type' => 'varchar',
'length' => '32',
'not null' => FALSE,
),
'timestamp' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => FALSE,
'disp-width' => '11',
),
'rand' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => FALSE,
'disp-width' => '11',
),
'uid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => FALSE,
'disp-width' => '11',
),
),
'primary key' => array(
'id',
),
);
return $schema;
}
function w3c_validator_update_6100() {
$ret = array();
$table = drupal_get_schema('validator_access_tokens');
db_create_table($ret, 'validator_access_tokens', $table);
return $ret;
}