diff --git a/database/database.pgsql b/database/database.pgsql index b5924b926e9187d8c4bb4cfa738b329d0175754a..a02b56c5bb9eb422dbb03487e5fe5eca54c56c73 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 8aecc62c9e6644a95de4d56e2bf37915edd62315..90a9db22104f65e0235413329c19e9cbc9bd6643 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}");