From 53d6935b34e08cad9a72eb929becab0dbd438886 Mon Sep 17 00:00:00 2001
From: Andrew Dolgov <fox@bah.spb.su>
Date: Tue, 29 Nov 2005 19:30:08 +0100
Subject: schema: add filter actions, fix typo in PG schema

---
 schema/ttrss_schema_pgsql.sql | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

(limited to 'schema/ttrss_schema_pgsql.sql')

diff --git a/schema/ttrss_schema_pgsql.sql b/schema/ttrss_schema_pgsql.sql
index e4e01f1b0..dc4fd5eb8 100644
--- a/schema/ttrss_schema_pgsql.sql
+++ b/schema/ttrss_schema_pgsql.sql
@@ -2,6 +2,7 @@ drop table ttrss_version;
 drop table ttrss_labels;
 drop table ttrss_filters;
 drop table ttrss_filter_types;
+drop table ttrss_filter_actions;
 drop table ttrss_user_prefs;
 drop table ttrss_prefs;
 drop table ttrss_prefs_types;
@@ -23,7 +24,7 @@ create table ttrss_users (id serial not null primary key,
 	login varchar(120) not null unique,
 	pwd_hash varchar(250) not null,
 	last_login timestamp default null,
-	access_level integer not null default 0
+	access_level integer not null default 0,
 	theme_id integer references ttrss_themes(id) default null);
 
 insert into ttrss_users (login,pwd_hash,access_level) values ('admin', 'password', 10);
@@ -102,12 +103,23 @@ insert into ttrss_filter_types (id,name,description) values (3, 'both',
 insert into ttrss_filter_types (id,name,description) values (4, 'link', 
 	'Link');
 
+create table ttrss_filter_actions (id integer not null primary key, 
+	name varchar(120) unique not null, 
+	description varchar(250) not null unique);
+
+insert into ttrss_filter_actions (id,name,description) values (1, 'filter', 
+	'Filter article');
+
+insert into ttrss_filter_actions (id,name,description) values (2, 'catchup', 
+	'Mark as read');
+
 create table ttrss_filters (id serial not null primary key, 	
 	owner_uid integer not null references ttrss_users(id) on delete cascade,
 	feed_id integer references ttrss_feeds(id) on delete cascade default null,
 	filter_type integer not null references ttrss_filter_types(id), 
 	reg_exp varchar(250) not null,
-	description varchar(250) not null default '');
+	description varchar(250) not null default '',
+	action_id integer not null default 1 references ttrss_filter_actions(id) on delete cascade);
 
 create table ttrss_labels (id serial not null primary key, 
 	owner_uid integer not null references ttrss_users(id) on delete cascade,
-- 
cgit v1.2.3

