View source
<?php
function slickgrid_install() {
db_query("UPDATE {system} SET weight = 100 WHERE name = 'slickgrid' and type = 'module'");
if (module_exists('lightbox2')) {
db_query("UPDATE {system} SET weight = 101 WHERE name = 'lightbox2' and type = 'module'");
}
drupal_install_schema('slickgrid');
}
function slickgrid_uninstall() {
drupal_uninstall_schema('slickgrid');
}
function slickgrid_schema() {
$schema['slickgrid'] = array(
'fields' => array(
'uid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
'description' => 'The users UID.',
),
'view_name' => array(
'type' => 'varchar',
'length' => '32',
'default' => '',
'not null' => TRUE,
'description' => 'The unique name of the view. May only be alphanumeric characters plus underscores.',
),
'settings' => array(
'type' => 'text',
'not null' => FALSE,
'size' => 'big',
'description' => 'A serialized array of view settings.',
),
),
'primary key' => array(
'uid',
'view_name',
),
);
return $schema;
}