Page 1 of 1

ttrss_enclosures

Posted: 11 May 2009, 19:54
by Pois
Hi,
I'm trying to slim my database,
in the table ttrss_enclosures I have found many entry which link to nothing.
Does this table is purged sometime ?

Re: ttrss_enclosures

Posted: 11 May 2009, 21:55
by fox
That's weird.

Code: Select all

create table ttrss_enclosures (id serial not null primary key,
   content_url text not null,
   content_type varchar(250) not null,
   title text not null,
   duration text not null,
   post_id integer references ttrss_entries(id) ON DELETE cascade NOT NULL);


Unless I'm missing something, the foreign key should delete the enclosure links when the referenced article is deleted.

Re: ttrss_enclosures

Posted: 11 May 2009, 22:34
by Pois
Hmm,
if I'm right myisam doesn't support delete on cascade but :
ttrss_cat_counters_cache : MyISAM
ttrss_counters_cache : MyISAM
ttrss_enclosures : MyISAM
ttrss_feedbrowser_cache : MyISAM

I'm using tt-rss since many month/versions, it's possible that's came from an old release ?

Re: ttrss_enclosures

Posted: 11 May 2009, 23:25
by fox
Looks like a bug in mysql schema. You can recreate the table with TYPE=InnoDB.

I'll fix it in the trunk, probably by nuking the table and recreating it as InnoDB in the schema upgrade script. Can't think of better solution since the table will probably contain invalid data. :(