From e0382fd6df411b40d0ea3dfd55c06ca2cfeb40c1 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 6 Oct 2009 14:14:55 +0400 Subject: [PATCH] schema: add ttrss_feeds.always_display_enclosures --- schema/ttrss_schema_mysql.sql | 3 ++- schema/ttrss_schema_pgsql.sql | 3 ++- schema/versions/mysql/57.sql | 6 ++++++ schema/versions/pgsql/57.sql | 6 ++++++ 4 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 schema/versions/mysql/57.sql create mode 100644 schema/versions/pgsql/57.sql diff --git a/schema/ttrss_schema_mysql.sql b/schema/ttrss_schema_mysql.sql index ba9e8d43..d3c8b5f1 100644 --- a/schema/ttrss_schema_mysql.sql +++ b/schema/ttrss_schema_mysql.sql @@ -100,6 +100,7 @@ create table ttrss_feeds (id integer not null auto_increment primary key, auth_pass_encrypted boolean not null default false, last_viewed datetime default null, last_update_started datetime default null, + always_display_enclosures boolean not null default false, update_method integer not null default 0, index(owner_uid), foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE, @@ -225,7 +226,7 @@ create table ttrss_tags (id integer primary key auto_increment, create table ttrss_version (schema_version int not null) TYPE=InnoDB; -insert into ttrss_version values (56); +insert into ttrss_version values (57); create table ttrss_enclosures (id serial not null primary key, content_url text not null, diff --git a/schema/ttrss_schema_pgsql.sql b/schema/ttrss_schema_pgsql.sql index 830b8da6..61ffcb10 100644 --- a/schema/ttrss_schema_pgsql.sql +++ b/schema/ttrss_schema_pgsql.sql @@ -78,6 +78,7 @@ create table ttrss_feeds (id serial not null primary key, last_viewed timestamp default null, last_update_started timestamp default null, update_method integer not null default 0, + always_display_enclosures boolean not null default false, auth_pass_encrypted boolean not null default false); create index ttrss_feeds_owner_uid_index on ttrss_feeds(owner_uid); @@ -201,7 +202,7 @@ create index ttrss_tags_owner_uid_index on ttrss_tags(owner_uid); create table ttrss_version (schema_version int not null); -insert into ttrss_version values (56); +insert into ttrss_version values (57); create table ttrss_enclosures (id serial not null primary key, content_url text not null, diff --git a/schema/versions/mysql/57.sql b/schema/versions/mysql/57.sql new file mode 100644 index 00000000..27a66d5b --- /dev/null +++ b/schema/versions/mysql/57.sql @@ -0,0 +1,6 @@ +alter table ttrss_feeds add column always_display_enclosures boolean; +update ttrss_feeds set always_display_enclosures = false; +alter table ttrss_feeds change always_display_enclosures always_display_enclosures boolean not null; +alter table ttrss_feeds alter column always_display_enclosures set default false; + +update ttrss_version set schema_version = 57; diff --git a/schema/versions/pgsql/57.sql b/schema/versions/pgsql/57.sql new file mode 100644 index 00000000..3dd7898b --- /dev/null +++ b/schema/versions/pgsql/57.sql @@ -0,0 +1,6 @@ +alter table ttrss_feeds add column always_display_enclosures boolean; +update ttrss_feeds set always_display_enclosures = false; +alter table ttrss_feeds alter column always_display_enclosures set not null; +alter table ttrss_feeds alter column always_display_enclosures set default false; + +update ttrss_version set schema_version = 57; -- 2.39.5