From c0fb0a5ec04c064bb848534185b51c5d1b7bdaaf Mon Sep 17 00:00:00 2001
From: Andrew Dolgov <noreply@fakecake.org>
Date: Thu, 4 Mar 2021 08:30:52 +0300
Subject: wip for db_migrations for core schema

---
 sql/pgsql/migrations/96.sql | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 sql/pgsql/migrations/96.sql

(limited to 'sql/pgsql/migrations/96.sql')

diff --git a/sql/pgsql/migrations/96.sql b/sql/pgsql/migrations/96.sql
new file mode 100644
index 000000000..e3cdc06be
--- /dev/null
+++ b/sql/pgsql/migrations/96.sql
@@ -0,0 +1,23 @@
+begin;
+
+create table ttrss_filters2(id serial not null primary key,
+	owner_uid integer not null references ttrss_users(id) on delete cascade,
+	match_any_rule boolean not null default false,
+	enabled boolean not null default true);
+
+create table ttrss_filters2_rules(id serial not null primary key,
+	filter_id integer not null references ttrss_filters2(id) on delete cascade,
+	reg_exp varchar(250) not null,
+	filter_type integer not null references ttrss_filter_types(id),
+	feed_id integer references ttrss_feeds(id) on delete cascade default null,
+	cat_id integer references ttrss_feed_categories(id) on delete cascade default null,
+	cat_filter boolean not null default false);
+
+create table ttrss_filters2_actions(id serial not null primary key,
+	filter_id integer not null references ttrss_filters2(id) on delete cascade,
+	action_id integer not null default 1 references ttrss_filter_actions(id) on delete cascade,
+	action_param varchar(250) not null default '');
+
+update ttrss_version set schema_version = 96;
+
+commit;
-- 
cgit v1.2.3-54-g00ecf

