From ab1c2c9de5951a8b6c857708f12ec280db03575f Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 12 Jan 2006 14:19:13 +0100 Subject: [PATCH] schema: support for audio enclosure in ttrss_entries --- schema/ttrss_schema_mysql.sql | 1 + schema/ttrss_schema_pgsql.sql | 1 + schema/upgrade-1.1.1-1.1.2-mysql.sql | 8 +++++--- schema/upgrade-1.1.1-1.1.2-pgsql.sql | 5 +++++ 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/schema/ttrss_schema_mysql.sql b/schema/ttrss_schema_mysql.sql index 8b62cd83..186c197e 100644 --- a/schema/ttrss_schema_mysql.sql +++ b/schema/ttrss_schema_mysql.sql @@ -82,6 +82,7 @@ create table ttrss_entries (id integer not null primary key auto_increment, no_orig_date bool not null default 0, date_entered datetime not null, num_comments integer not null default 0, + audio_enclosure varchar(250) not null default '', comments varchar(250) not null default '') TYPE=InnoDB; create table ttrss_user_entries ( diff --git a/schema/ttrss_schema_pgsql.sql b/schema/ttrss_schema_pgsql.sql index a0d570d3..053284d4 100644 --- a/schema/ttrss_schema_pgsql.sql +++ b/schema/ttrss_schema_pgsql.sql @@ -74,6 +74,7 @@ create table ttrss_entries (id serial not null primary key, no_orig_date boolean not null default false, date_entered timestamp not null default NOW(), num_comments integer not null default 0, + audio_enclosure varchar(250) not null default '', comments varchar(250) not null default ''); create index ttrss_entries_guid_index on ttrss_entries(guid); diff --git a/schema/upgrade-1.1.1-1.1.2-mysql.sql b/schema/upgrade-1.1.1-1.1.2-mysql.sql index 6dfc5f82..1501a8c5 100644 --- a/schema/upgrade-1.1.1-1.1.2-mysql.sql +++ b/schema/upgrade-1.1.1-1.1.2-mysql.sql @@ -1,5 +1,3 @@ -begin; - alter table ttrss_feeds add column parent_feed integer; alter table ttrss_feeds add foreign key (parent_feed) references ttrss_feeds(id) on delete set null; @@ -14,4 +12,8 @@ insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) valu update ttrss_version set schema_version = 4; -commit; +alter table ttrss_entries add column audio_enclosure varchar(250); +update ttrss_entries set audio_enclosure = ''; +alter table ttrss_entries change audio_enclosure private varchar(250) not null; +alter table ttrss_entries alter column audio_enclosure set default ''; + diff --git a/schema/upgrade-1.1.1-1.1.2-pgsql.sql b/schema/upgrade-1.1.1-1.1.2-pgsql.sql index 1f926eae..201a520f 100644 --- a/schema/upgrade-1.1.1-1.1.2-pgsql.sql +++ b/schema/upgrade-1.1.1-1.1.2-pgsql.sql @@ -12,6 +12,11 @@ alter table ttrss_feeds alter column private set default false; insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('HIDE_READ_FEEDS', 1, 'false', 'Hide feeds with no unread messages',2); +alter table ttrss_entries add column audio_enclosure varchar(250); +update ttrss_entries set audio_enclosure = ''; +alter table ttrss_entries alter column audio_enclosure set not null; +alter table ttrss_entries alter column audio_enclosure set default ''; + update ttrss_version set schema_version = 4; commit; -- 2.39.5