From 3525d9df097a047f84e538c2a76ce2c60dbf0807 Mon Sep 17 00:00:00 2001
From: Dries Buytaert <dries@buytaert.net>
Date: Mon, 27 Sep 2004 19:56:51 +0000
Subject: [PATCH] - Patch #11094 by Allen Chandler and Adrian: fixed PostgreSQL
 related SQL problem in aggregator module.

---
 database/database.pgsql | 8 ++++----
 database/updates.inc    | 5 +++++
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/database/database.pgsql b/database/database.pgsql
index b5924b926e91..a02b56c5bb9e 100644
--- a/database/database.pgsql
+++ b/database/database.pgsql
@@ -92,7 +92,7 @@ CREATE TABLE boxes (
 CREATE TABLE aggregator_category (
   cid serial,
   title varchar(255) NOT NULL default '',
-  description text NOT NULL,
+  description text,
   block smallint NOT NULL default '0',
   PRIMARY KEY  (cid),
   UNIQUE (title)
@@ -129,8 +129,8 @@ CREATE TABLE aggregator_feed (
   refresh integer NOT NULL default '0',
   checked integer NOT NULL default '0',
   link varchar(255) NOT NULL default '',
-  description text NOT NULL,
-  image text NOT NULL,
+  description text,
+  image text,
   etag varchar(255) NOT NULL default '',
   modified integer NOT NULL default '0',
   block smallint NOT NULL default '0',
@@ -149,7 +149,7 @@ CREATE TABLE aggregator_item (
   title varchar(255) NOT NULL default '',
   link varchar(255) NOT NULL default '',
   author varchar(255) NOT NULL default '',
-  description text NOT NULL,
+  description text,
   timestamp integer default NULL,
   PRIMARY KEY  (iid)
 );
diff --git a/database/updates.inc b/database/updates.inc
index 8aecc62c9e66..90a9db22104f 100644
--- a/database/updates.inc
+++ b/database/updates.inc
@@ -1072,6 +1072,11 @@ function update_85() {
       cid int(10) NOT NULL,
       PRIMARY KEY (iid, cid)
      )");
+    $ret[] = update_sql("ALTER TABLE {aggregator_category} ALTER COLUMN description DROP NOT NULL");
+    $ret[] = update_sql("ALTER TABLE {aggregator_item} ALTER COLUMN description DROP NOT NULL");
+    $ret[] = update_sql("ALTER TABLE {aggregator_feed} ALTER COLUMN description DROP NOT NULL");
+    $ret[] = update_sql("ALTER TABLE {aggregator_feed} ALTER COLUMN image DROP NOT NULL");
+
   }
   else {
     $ret[] = update_sql("ALTER TABLE {bundle} RENAME TO {aggregator_category}");
-- 
GitLab