diff options
author | Dries Buytaert <dries@buytaert.net> | 2007-10-05 14:43:26 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2007-10-05 14:43:26 +0000 |
commit | 39706e3c51cf206ca6669bbb7a090d2f7d394591 (patch) | |
tree | 9286ccd302d526ea8a1de799081356fcc77c28a3 /modules/aggregator | |
parent | d568128b9f7a0181b31e9baa087022e892352ea7 (diff) | |
download | brdo-39706e3c51cf206ca6669bbb7a090d2f7d394591.tar.gz brdo-39706e3c51cf206ca6669bbb7a090d2f7d394591.tar.bz2 |
- Patch #150245 by webchick, bjaspan, ralf, Arancaytar et al: move the .schema files into .install files to prevent mistakes.
Diffstat (limited to 'modules/aggregator')
-rw-r--r-- | modules/aggregator/aggregator.install | 71 | ||||
-rw-r--r-- | modules/aggregator/aggregator.schema | 70 |
2 files changed, 71 insertions, 70 deletions
diff --git a/modules/aggregator/aggregator.install b/modules/aggregator/aggregator.install index 8c44c33a7..84593d647 100644 --- a/modules/aggregator/aggregator.install +++ b/modules/aggregator/aggregator.install @@ -21,3 +21,74 @@ function aggregator_uninstall() { variable_del('aggregator_clear'); variable_del('aggregator_category_selector'); } + +/** + * Implementation of hook_schema(). + */ +function aggregator_schema() { + $schema['aggregator_category'] = array( + 'fields' => array( + 'cid' => array('type' => 'serial', 'not null' => TRUE), + 'title' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'description' => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'), + 'block' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny') + ), + 'primary key' => array('cid'), + 'unique keys' => array('title' => array('title')), + ); + + $schema['aggregator_category_feed'] = array( + 'fields' => array( + 'fid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + 'cid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0) + ), + 'primary key' => array('fid', 'cid'), + ); + + $schema['aggregator_category_item'] = array( + 'fields' => array( + 'iid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + 'cid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0) + ), + 'primary key' => array('iid', 'cid'), + ); + + $schema['aggregator_feed'] = array( + 'fields' => array( + 'fid' => array('type' => 'serial', 'not null' => TRUE), + 'title' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'url' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'refresh' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + 'checked' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + 'link' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'description' => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'), + 'image' => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'), + 'etag' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'modified' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + 'block' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny') + ), + 'unique keys' => array( + 'url' => array('url'), + 'title' => array('title') + ), + 'primary key' => array('fid'), + ); + + $schema['aggregator_item'] = array( + 'fields' => array( + 'iid' => array('type' => 'serial', 'not null' => TRUE), + 'fid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + 'title' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'link' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'author' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'description' => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'), + 'timestamp' => array('type' => 'int', 'not null' => FALSE), + 'guid' => array('type' => 'varchar', 'length' => 255, 'not null' => FALSE) + ), + 'indexes' => array('fid' => array('fid')), + 'primary key' => array('iid'), + ); + + return $schema; +} + diff --git a/modules/aggregator/aggregator.schema b/modules/aggregator/aggregator.schema deleted file mode 100644 index ed0c146e9..000000000 --- a/modules/aggregator/aggregator.schema +++ /dev/null @@ -1,70 +0,0 @@ -<?php -// $Id$ - -function aggregator_schema() { - $schema['aggregator_category'] = array( - 'fields' => array( - 'cid' => array('type' => 'serial', 'not null' => TRUE), - 'title' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'description' => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'), - 'block' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny') - ), - 'primary key' => array('cid'), - 'unique keys' => array('title' => array('title')), - ); - - $schema['aggregator_category_feed'] = array( - 'fields' => array( - 'fid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'cid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0) - ), - 'primary key' => array('fid', 'cid'), - ); - - $schema['aggregator_category_item'] = array( - 'fields' => array( - 'iid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'cid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0) - ), - 'primary key' => array('iid', 'cid'), - ); - - $schema['aggregator_feed'] = array( - 'fields' => array( - 'fid' => array('type' => 'serial', 'not null' => TRUE), - 'title' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'url' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'refresh' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'checked' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'link' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'description' => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'), - 'image' => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'), - 'etag' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'modified' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'block' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny') - ), - 'unique keys' => array( - 'url' => array('url'), - 'title' => array('title') - ), - 'primary key' => array('fid'), - ); - - $schema['aggregator_item'] = array( - 'fields' => array( - 'iid' => array('type' => 'serial', 'not null' => TRUE), - 'fid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'title' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'link' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'author' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'description' => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'), - 'timestamp' => array('type' => 'int', 'not null' => FALSE), - 'guid' => array('type' => 'varchar', 'length' => 255, 'not null' => FALSE) - ), - 'indexes' => array('fid' => array('fid')), - 'primary key' => array('iid'), - ); - - return $schema; -} - |