| 4 |
function fast_gallery_uninstall() { |
function fast_gallery_uninstall() { |
| 5 |
variable_del('fg_storage_engine'); |
variable_del('fg_storage_engine'); |
| 6 |
variable_del('fg_galleries'); |
variable_del('fg_galleries'); |
| 7 |
|
variable_del('fg_folder_first'); |
| 8 |
} |
} |
| 9 |
|
|
| 10 |
function fast_gallery_schema() { |
function fast_gallery_schema() { |
| 11 |
$schema['fast_gallery'] = array( |
|
| 12 |
|
/*$schema['fast_gallery'] = array( |
| 13 |
'description' => 'The base table; matching between files and hierarchy', |
'description' => 'The base table; matching between files and hierarchy', |
| 14 |
'fields' => array( |
'fields' => array( |
| 15 |
'fid' => array( |
'fid' => array( |
| 35 |
), |
), |
| 36 |
), |
), |
| 37 |
'foreign keys' => array( |
'foreign keys' => array( |
| 38 |
'fid' => array('file' => 'fid'), |
'fid' => array('fast_gallery' => 'fid'), |
| 39 |
'foid' => array('fast_gallery_hierarchy' => 'foid'), |
'foid' => array('fast_gallery_hierarchy' => 'foid'), |
| 40 |
), |
), |
| 41 |
'primary key' => array('fid', 'foid'), |
'primary key' => array('fid', 'foid'), |
| 42 |
); |
);*/ |
| 43 |
|
|
| 44 |
|
|
| 45 |
$schema['fast_gallery_hierarchy'] = array( |
$schema['fast_gallery_hierarchy'] = array( |
| 69 |
'primary key' => array('foid'), |
'primary key' => array('foid'), |
| 70 |
); |
); |
| 71 |
|
|
| 72 |
return $schema; |
$schema['fast_gallery_file'] = array( |
| 73 |
} |
'description' => 'Store the path to the files', |
| 74 |
|
'fields' => array( |
| 75 |
/** |
/*'fid' => array( |
| 76 |
* Add runid to {fast_gallery} |
'type' => 'serial', |
| 77 |
*/ |
'description' => 'Primary identifier for files', |
| 78 |
function fast_gallery_update_7001() { |
'unsigned' => TRUE, |
| 79 |
db_add_field('fast_gallery', 'runid', array( |
'not null' => TRUE, |
| 80 |
|
),*/ |
| 81 |
|
'foid' => array( |
| 82 |
|
'description' => 'Referencing the folder', |
| 83 |
|
'type' => 'int', |
| 84 |
|
'unsigned' => TRUE, |
| 85 |
|
'not null' => TRUE, |
| 86 |
|
), |
| 87 |
|
'filename' => array( |
| 88 |
|
'description' => 'The actual filename', |
| 89 |
|
'type' => 'varchar', |
| 90 |
|
'length' => 255, |
| 91 |
|
'not null' => TRUE, |
| 92 |
|
'default' => '', |
| 93 |
|
), |
| 94 |
|
'runid' => array( |
| 95 |
'description' => 'Each time the update scriped is run we give an id -> easy to delete old entries', |
'description' => 'Each time the update scriped is run we give an id -> easy to delete old entries', |
| 96 |
'type' => 'int', |
'type' => 'int', |
| 97 |
'unsigned' => TRUE, |
'unsigned' => TRUE, |
| 98 |
'not null' => TRUE, |
'not null' => TRUE, |
| 99 |
'default' => 0, |
'default' => 0, |
| 100 |
)); |
), |
| 101 |
} |
), |
| 102 |
|
'primary key' => array('foid', 'filename'), |
| 103 |
|
'foreign keys' => array( |
| 104 |
|
'foid' => array('fast_gallery_hierarchy' => 'foid'), |
| 105 |
|
), |
| 106 |
|
); |
| 107 |
|
|
| 108 |
|
return $schema; |
| 109 |
|
} |
| 110 |
|
|