<?php
define('EXPECTED_CONFIG_VERSION', 26);
- define('SCHEMA_VERSION', 111);
+ define('SCHEMA_VERSION', 112);
define('LABEL_BASE_INDEX', -1024);
define('PLUGIN_FEED_BASE_INDEX', -128);
$cat_id = (int)getFeedCategory($link, $feed_id);
$result = db_query($link, "SELECT * FROM ttrss_filters2 WHERE
- owner_uid = $owner_uid AND enabled = true");
+ owner_uid = $owner_uid AND enabled = true ORDER BY order_id, title");
$check_cats = join(",", array_merge(
getParentCategories($link, $cat_id, $owner_uid),
match_any_rule boolean not null default false,
enabled boolean not null default true,
inverse bool not null default false,
+ title varchar(250) not null default '',
+ order_id integer not null default 0,
index(owner_uid),
foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
create table ttrss_version (schema_version int not null) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
-insert into ttrss_version values (111);
+insert into ttrss_version values (112);
create table ttrss_enclosures (id integer primary key auto_increment,
content_url text not null,
owner_uid integer not null references ttrss_users(id) on delete cascade,
match_any_rule boolean not null default false,
inverse boolean not null default false,
+ title varchar(250) not null default '',
+ order_id integer not null default 0,
enabled boolean not null default true);
create table ttrss_filters2_rules(id serial not null primary key,
create table ttrss_version (schema_version int not null);
-insert into ttrss_version values (111);
+insert into ttrss_version values (112);
create table ttrss_enclosures (id serial not null primary key,
content_url text not null,
--- /dev/null
+begin;
+
+alter table ttrss_filters2 add column order_id integer;
+update ttrss_filters2 set order_id = 0;
+alter table ttrss_filters2 change order_id order_id integer not null;
+alter table ttrss_filters2 alter column order_id set default 0;
+
+alter table ttrss_filters2 add column title varchar(250);
+update ttrss_filters2 set title = '';
+alter table ttrss_filters2 change title title varchar(250) not null;
+alter table ttrss_filters2 alter column title set default '';
+
+update ttrss_version set schema_version = 112;
+
+commit;
--- /dev/null
+begin;
+
+alter table ttrss_filters2 add column order_id integer;
+update ttrss_filters2 set order_id = 0;
+alter table ttrss_filters2 alter column order_id set not null;
+alter table ttrss_filters2 alter column order_id set default 0;
+
+alter table ttrss_filters2 add column title varchar(250);
+update ttrss_filters2 set title = '';
+alter table ttrss_filters2 alter column title set not null;
+alter table ttrss_filters2 alter column title set default '';
+
+update ttrss_version set schema_version = 112;
+
+commit;