From: Andrew Dolgov Date: Tue, 6 Oct 2009 10:14:55 +0000 (+0400) Subject: schema: add ttrss_feeds.always_display_enclosures X-Git-Tag: 1.3.4~36 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=e0382fd6df411b40d0ea3dfd55c06ca2cfeb40c1;p=tt-rss.git schema: add ttrss_feeds.always_display_enclosures --- 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;