From ffba8297eaada358f913d327816d4b7d91f3375b Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 9 Aug 2007 11:09:22 +0100 Subject: [PATCH] schema: add published column --- schema/ttrss_schema_mysql.sql | 1 + schema/ttrss_schema_pgsql.sql | 1 + schema/versions/mysql/19.sql | 5 +++++ schema/versions/pgsql/19.sql | 5 +++++ 4 files changed, 12 insertions(+) diff --git a/schema/ttrss_schema_mysql.sql b/schema/ttrss_schema_mysql.sql index bbc769070..8666a755c 100644 --- a/schema/ttrss_schema_mysql.sql +++ b/schema/ttrss_schema_mysql.sql @@ -101,6 +101,7 @@ create table ttrss_user_entries ( feed_id int not null, owner_uid integer not null, marked bool not null default 0, + published bool not null default 0, last_read datetime, unread bool not null default 1, index (ref_id), diff --git a/schema/ttrss_schema_pgsql.sql b/schema/ttrss_schema_pgsql.sql index 04abd68a6..71af02376 100644 --- a/schema/ttrss_schema_pgsql.sql +++ b/schema/ttrss_schema_pgsql.sql @@ -97,6 +97,7 @@ create table ttrss_user_entries ( feed_id int references ttrss_feeds(id) ON DELETE CASCADE not null, owner_uid integer not null references ttrss_users(id) ON DELETE CASCADE, marked boolean not null default false, + published boolean not null default false, last_read timestamp, unread boolean not null default true); diff --git a/schema/versions/mysql/19.sql b/schema/versions/mysql/19.sql index 19bb4b25d..db4237da8 100644 --- a/schema/versions/mysql/19.sql +++ b/schema/versions/mysql/19.sql @@ -1,3 +1,8 @@ insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_PREFS_PUBLISH_KEY', 2, '', '', 1); +alter table ttrss_user_entries add column published bool; +update ttrss_user_entries set published = false; +alter table ttrss_user_entries change published published bool not null; +alter table ttrss_user_entries alter column published set default false; + update ttrss_version set schema_version = 19; diff --git a/schema/versions/pgsql/19.sql b/schema/versions/pgsql/19.sql index 19bb4b25d..79e628464 100644 --- a/schema/versions/pgsql/19.sql +++ b/schema/versions/pgsql/19.sql @@ -1,3 +1,8 @@ insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_PREFS_PUBLISH_KEY', 2, '', '', 1); +alter table ttrss_user_entries add column published boolean; +update ttrss_user_entries set published = false; +alter table ttrss_user_entries alter column published set not null; +alter table ttrss_user_entries alter column published set default false; + update ttrss_version set schema_version = 19;