Index: feeds.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/feeds/feeds.install,v
retrieving revision 1.13.2.1
diff -u -p -r1.13.2.1 feeds.install
--- feeds.install	25 Sep 2010 16:07:50 -0000	1.13.2.1
+++ feeds.install	10 Feb 2011 20:52:08 -0000
@@ -45,6 +45,12 @@ function feeds_schema() {
   $schema['feeds_source'] = array(
     'description' => 'Source definitions for feeds.',
     'fields' => array(
+      'source_id' => array(
+        'type' => 'serial',
+        'unsigned' => TRUE,
+        'not null' => TRUE,
+        'description' => 'Feed source unique id.',
+      ),
       'id' => array(
         'type' => 'varchar',
         'length' => 128,
@@ -78,7 +84,7 @@ function feeds_schema() {
         'serialize' => TRUE,
       ),
     ),
-    'primary key' => array('id', 'feed_nid'),
+    'primary key' => array('source_id'),
     'indexes' => array(
       'id' => array('id'),
       'feed_nid' => array('feed_nid'),
@@ -567,3 +573,27 @@ function feeds_update_6013() {
   variable_set('feeds_reschedule', TRUE);
   return array();
 }
+
+/**
+ * Drop primary key, add auto-increment field as new primary key.
+ * Required for views integration: http://drupal.org/node/654466.
+ */
+function feeds_update_6014() {
+  $ret = array();
+
+  db_drop_primary_key($ret, 'feeds_source');
+
+  // Add an auto-increment column and a primary key.
+  $spec = array(
+    'type' => 'serial',
+    'unsigned' => TRUE,
+    'not null' => TRUE,
+    'description' => 'Feed source unique id.',
+  );
+  $new_key = array(
+    'primary key' => array('source_id'),
+  );
+  db_add_field($ret, 'feeds_source', 'source_id', $spec, $new_key);
+
+  return $ret;
+}
Index: views/feeds.views.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/feeds/views/feeds.views.inc,v
retrieving revision 1.3
diff -u -p -r1.3 feeds.views.inc
--- views/feeds.views.inc	11 Jul 2010 16:57:02 -0000	1.3
+++ views/feeds.views.inc	10 Feb 2011 20:52:08 -0000
@@ -20,7 +20,7 @@ function feeds_views_data() {
   $data['feeds_source']['table'] = array(
     'group' => 'Feeds source',
     'base' => array(
-      'field' => array('feed_nid', 'id'),
+      'field' => 'fid',
       'title' => 'Feeds source',
       'help' => 'The source information for a feed, for example its URL',
     ),
