View source
<?php
function fe_block_install() {
drupal_install_schema('fe_block');
$weight = db_result(db_query("SELECT weight FROM {system} WHERE name = 'block'"));
db_query("UPDATE {system} SET weight = %d WHERE name = 'fe_block'", $weight + 1);
}
function fe_block_update_6011() {
$weight = db_result(db_query("SELECT weight FROM {system} WHERE name = 'block'"));
db_query("UPDATE {system} SET weight = %d WHERE name = 'fe_block'", $weight + 1);
}
function fe_block_uninstall() {
drupal_uninstall_schema('fe_block');
}
function fe_block_schema() {
$schema['fe_block_boxes'] = array(
'description' => '',
'export' => array(
'key' => 'machine_name',
'can disable' => FALSE,
),
'fields' => array(
'bid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
'no export' => TRUE,
),
'machine_name' => array(
'description' => 'machine_name',
'type' => 'varchar',
'length' => 32,
'not null' => TRUE,
'default' => '',
),
),
'indexes' => array(
'machine_name' => array(
'machine_name',
),
),
'primary key' => array(
'bid',
),
);
return $schema;
}