diff options
Diffstat (limited to 'modules/aggregator/aggregator.install')
-rw-r--r-- | modules/aggregator/aggregator.install | 54 |
1 files changed, 38 insertions, 16 deletions
diff --git a/modules/aggregator/aggregator.install b/modules/aggregator/aggregator.install index f19d7de9b..b84556a9d 100644 --- a/modules/aggregator/aggregator.install +++ b/modules/aggregator/aggregator.install @@ -130,10 +130,8 @@ function aggregator_schema() { 'description' => 'Title of the feed.', ), 'url' => array( - 'type' => 'varchar', - 'length' => 255, + 'type' => 'text', 'not null' => TRUE, - 'default' => '', 'description' => 'URL to the feed.', ), 'refresh' => array( @@ -155,10 +153,8 @@ function aggregator_schema() { 'description' => 'Time when this feed was queued for refresh, 0 if not queued.', ), 'link' => array( - 'type' => 'varchar', - 'length' => 255, + 'type' => 'text', 'not null' => TRUE, - 'default' => '', 'description' => 'The parent website of the feed; comes from the <link> element in the feed.', ), 'description' => array( @@ -202,13 +198,13 @@ function aggregator_schema() { ) ), 'primary key' => array('fid'), - 'unique keys' => array( - 'url' => array('url'), - 'title' => array('title'), - ), 'indexes' => array( + 'url' => array(array('url', 255)), 'queued' => array('queued'), ), + 'unique keys' => array( + 'title' => array('title'), + ), ); $schema['aggregator_item'] = array( @@ -233,10 +229,8 @@ function aggregator_schema() { 'description' => 'Title of the feed item.', ), 'link' => array( - 'type' => 'varchar', - 'length' => 255, + 'type' => 'text', 'not null' => TRUE, - 'default' => '', 'description' => 'Link to the feed item.', ), 'author' => array( @@ -258,9 +252,8 @@ function aggregator_schema() { 'description' => 'Posted date of the feed item, as a Unix timestamp.', ), 'guid' => array( - 'type' => 'varchar', - 'length' => 255, - 'not null' => FALSE, + 'type' => 'text', + 'not null' => TRUE, 'description' => 'Unique identifier for the feed item.', ) ), @@ -280,6 +273,11 @@ function aggregator_schema() { } /** + * @addtogroup updates-6.x-to-7.x + * @{ + */ + +/** * Add hash column to aggregator_feed table. */ function aggregator_update_7000() { @@ -306,3 +304,27 @@ function aggregator_update_7002() { db_add_index('aggregator_feed', 'queued', array('queued')); } +/** + * @} End of "addtogroup updates-6.x-to-7.x" + */ + +/** + * @addtogroup updates-7.x-extra + * @{ + */ + +/** + * Increase the length of {aggregator_feed}.url. + */ +function aggregator_update_7003() { + db_drop_unique_key('aggregator_feed', 'url'); + db_change_field('aggregator_feed', 'url', 'url', array('type' => 'text', 'not null' => TRUE, 'description' => 'URL to the feed.')); + db_change_field('aggregator_feed', 'link', 'link', array('type' => 'text', 'not null' => TRUE, 'description' => 'The parent website of the feed; comes from the <link> element in the feed.')); + db_change_field('aggregator_item', 'link', 'link', array('type' => 'text', 'not null' => TRUE, 'description' => 'Link to the feed item.')); + db_change_field('aggregator_item', 'guid', 'guid', array('type' => 'text', 'not null' => TRUE, 'description' => 'Unique identifier for the feed item.')); + db_add_index('aggregator_feed', 'url', array(array('url', 255))); +} + +/** + * @} End of "addtogroup updates-7.x-extra" + */ |