From f0907182c660e92544a8adc52f5505a910741727 Mon Sep 17 00:00:00 2001
From: Andrew Dolgov <fox@madoka.spb.ru>
Date: Mon, 21 Jan 2008 04:27:42 +0100
Subject: schema: set cat_id in ttrss_feeds to null when category is deleted

---
 schema/ttrss_schema_pgsql.sql | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'schema/ttrss_schema_pgsql.sql')

diff --git a/schema/ttrss_schema_pgsql.sql b/schema/ttrss_schema_pgsql.sql
index 1a3ab1f0f..9b77533ed 100644
--- a/schema/ttrss_schema_pgsql.sql
+++ b/schema/ttrss_schema_pgsql.sql
@@ -52,7 +52,7 @@ create table ttrss_feed_categories(id serial not null primary key,
 create table ttrss_feeds (id serial not null primary key,
 	owner_uid integer not null references ttrss_users(id) on delete cascade,
 	title varchar(200) not null, 
-	cat_id integer references ttrss_feed_categories(id) default null,
+	cat_id integer default null references ttrss_feed_categories(id) on delete set null,
 	feed_url varchar(250) not null, 
 	icon_url varchar(250) not null default '',
 	update_interval integer not null default 0,
-- 
cgit v1.2.3-54-g00ecf

