schema: add feed/cat view_settings

This commit is contained in:
Andrew Dolgov 2013-04-01 09:09:20 +04:00
parent f041932021
commit b4f83063cc
5 changed files with 37 additions and 3 deletions

View File

@ -1,6 +1,6 @@
<?php <?php
define('EXPECTED_CONFIG_VERSION', 26); define('EXPECTED_CONFIG_VERSION', 26);
define('SCHEMA_VERSION', 113); define('SCHEMA_VERSION', 114);
define('LABEL_BASE_INDEX', -1024); define('LABEL_BASE_INDEX', -1024);
define('PLUGIN_FEED_BASE_INDEX', -128); define('PLUGIN_FEED_BASE_INDEX', -128);

View File

@ -62,6 +62,7 @@ create table ttrss_feed_categories(id integer not null primary key auto_incremen
collapsed bool not null default false, collapsed bool not null default false,
order_id integer not null default 0, order_id integer not null default 0,
parent_cat integer, parent_cat integer,
view_settings varchar(250) not null default '',
index(parent_cat), index(parent_cat),
foreign key (parent_cat) references ttrss_feed_categories(id) ON DELETE SET NULL, foreign key (parent_cat) references ttrss_feed_categories(id) ON DELETE SET NULL,
index(owner_uid), index(owner_uid),
@ -127,6 +128,7 @@ create table ttrss_feeds (id integer not null auto_increment primary key,
mark_unread_on_update boolean not null default false, mark_unread_on_update boolean not null default false,
update_on_checksum_change boolean not null default false, update_on_checksum_change boolean not null default false,
strip_images boolean not null default false, strip_images boolean not null default false,
view_settings varchar(250) not null default '',
pubsub_state integer not null default 0, pubsub_state integer not null default 0,
favicon_last_checked datetime default null, favicon_last_checked datetime default null,
index(owner_uid), index(owner_uid),
@ -296,7 +298,7 @@ create table ttrss_tags (id integer primary key auto_increment,
create table ttrss_version (schema_version int not null) ENGINE=InnoDB DEFAULT CHARSET=UTF8; create table ttrss_version (schema_version int not null) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
insert into ttrss_version values (113); insert into ttrss_version values (114);
create table ttrss_enclosures (id integer primary key auto_increment, create table ttrss_enclosures (id integer primary key auto_increment,
content_url text not null, content_url text not null,

View File

@ -56,6 +56,7 @@ create table ttrss_feed_categories(id serial not null primary key,
owner_uid integer not null references ttrss_users(id) on delete cascade, owner_uid integer not null references ttrss_users(id) on delete cascade,
collapsed boolean not null default false, collapsed boolean not null default false,
order_id integer not null default 0, order_id integer not null default 0,
view_settings varchar(250) not null default '',
parent_cat integer references ttrss_feed_categories(id) on delete set null, parent_cat integer references ttrss_feed_categories(id) on delete set null,
title varchar(200) not null); title varchar(200) not null);
@ -88,6 +89,7 @@ create table ttrss_feeds (id serial not null primary key,
mark_unread_on_update boolean not null default false, mark_unread_on_update boolean not null default false,
update_on_checksum_change boolean not null default false, update_on_checksum_change boolean not null default false,
strip_images boolean not null default false, strip_images boolean not null default false,
view_settings varchar(250) not null default '',
pubsub_state integer not null default 0, pubsub_state integer not null default 0,
favicon_last_checked timestamp default null, favicon_last_checked timestamp default null,
auth_pass_encrypted boolean not null default false); auth_pass_encrypted boolean not null default false);
@ -254,7 +256,7 @@ create index ttrss_tags_post_int_id_idx on ttrss_tags(post_int_id);
create table ttrss_version (schema_version int not null); create table ttrss_version (schema_version int not null);
insert into ttrss_version values (113); insert into ttrss_version values (114);
create table ttrss_enclosures (id serial not null primary key, create table ttrss_enclosures (id serial not null primary key,
content_url text not null, content_url text not null,

View File

@ -0,0 +1,15 @@
begin;
alter table ttrss_feeds add column view_settings varchar(250);
update ttrss_feeds set view_settings = '';
alter table ttrss_feeds change view_settings view_settings varchar(250) not null;
alter table ttrss_feeds alter column view_settings set default '';
alter table ttrss_feed_categories add column view_settings varchar(250);
update ttrss_feed_categories set view_settings = '';
alter table ttrss_feed_categories change view_settings view_settings varchar(250) not null;
alter table ttrss_feed_categories alter column view_settings set default '';
update ttrss_version set schema_version = 114;
commit;

View File

@ -0,0 +1,15 @@
begin;
alter table ttrss_feeds add column view_settings varchar(250);
update ttrss_feeds set view_settings = '';
alter table ttrss_feeds alter column view_settings set not null;
alter table ttrss_feeds alter column view_settings set default '';
alter table ttrss_feed_categories add column view_settings varchar(250);
update ttrss_feed_categories set view_settings = '';
alter table ttrss_feed_categories alter column view_settings set not null;
alter table ttrss_feed_categories alter column view_settings set default '';
update ttrss_version set schema_version = 114;
commit;