Index: aggregator.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator.admin.inc,v
retrieving revision 1.26
diff -u -p -r1.26 aggregator.admin.inc
--- aggregator.admin.inc	29 Apr 2009 07:18:04 -0000	1.26
+++ aggregator.admin.inc	3 May 2009 08:25:57 -0000
@@ -73,7 +73,7 @@ function aggregator_form_feed(&$form_sta
   $form['url'] = array('#type' => 'textfield',
     '#title' => t('URL'),
     '#default_value' => isset($feed->url) ? $feed->url : '',
-    '#maxlength' => 255,
+    '#maxlength' => 65535,
     '#description' => t('The fully-qualified URL of the feed.'),
     '#required' => TRUE,
   );
Index: aggregator.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator.install,v
retrieving revision 1.20
diff -u -p -r1.20 aggregator.install
--- aggregator.install	22 Dec 2008 19:38:31 -0000	1.20
+++ aggregator.install	3 May 2009 08:25:58 -0000
@@ -124,10 +124,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(
@@ -143,10 +141,8 @@ function aggregator_schema() {
         'description' => 'Last time feed was checked for new items, as Unix timestamp.',
       ),
       'link' => array(
-        'type' => 'varchar',
-        'length' => 255,
+        'type' => 'text',
         'not null' => TRUE,
-        'default' => '',
         'description' => 'The parent website of the feed; comes from the &lt;link&gt; element in the feed.',
       ),
       'description' => array(
@@ -191,7 +187,7 @@ function aggregator_schema() {
     ),
     'primary key' => array('fid'),
     'unique keys' => array(
-      'url'  => array('url'),
+      'url' => array(array('url',255)),
       'title' => array('title'),
     ),
   );
@@ -218,10 +214,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(
@@ -252,6 +246,8 @@ function aggregator_schema() {
     'primary key' => array('iid'),
     'indexes' => array(
       'fid' => array('fid'),
+    	'link'  => array(array('link',255)),
+    	'guid' => array('guid'),
     ),
   );
 
@@ -266,3 +262,18 @@ function aggregator_update_7000() {
   db_add_field($ret, 'aggregator_feed', 'hash', array('type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => ''));
   return $ret;
 }
+
+/**
+ * Allow longer URLs and add an index on feed_item.guid.
+ */
+function aggregator_update_7001() {
+  $ret = array();
+  db_drop_unique_key($ret, 'aggregator_feed', 'url');
+  db_change_field($ret, 'aggregator_feed', 'url', 'url', array('type' => 'text', 'not null' => TRUE, 'description' => 'URL to the feed.'));
+  db_change_field($ret, 'aggregator_feed', 'link', 'link', array('type' => 'text', 'not null' => TRUE, 'description' => 'The parent website of the feed; comes from the &lt;link&gt; element in the feed.'));
+  db_change_field($ret, 'aggregator_item', 'link', 'link', array( 'type' => 'text', 'not null' => TRUE, 'description' => 'Link to the feed item.'));
+  db_add_index($ret, 'aggregator_item', 'guid', array('guid'));
+  db_add_index($ret, 'aggregator_item', 'link', array(array('link', 255)));
+  db_add_unique_key($ret, 'aggregator_feed', 'url', array(array('url', 255)));
+  return $ret;
+}
Index: aggregator.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator.module,v
retrieving revision 1.406
diff -u -p -r1.406 aggregator.module
--- aggregator.module	26 Apr 2009 19:59:31 -0000	1.406
+++ aggregator.module	3 May 2009 08:25:58 -0000
@@ -479,6 +479,7 @@ function aggregator_save_feed($edit) {
         'block' => $edit['block'],
         'description' => '',
         'image' => '',
+      	'link' => '',
       ))
       ->execute();
 
@@ -519,6 +520,8 @@ function aggregator_remove($feed) {
       'modified' => 0,
       'description' => $feed->description,
       'image' => $feed->image,
+    	'url' => '',
+    	'link' => '',
     ))
     ->execute();
 }
