ttrss_enclosures

Development-related discussion, including bundled plugins
Pois
Bear Rating Trainee
Bear Rating Trainee
Posts: 2
Joined: 11 May 2009, 19:39

ttrss_enclosures

Postby Pois » 11 May 2009, 19:54

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 ?

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: ttrss_enclosures

Postby fox » 11 May 2009, 21:55

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.

Pois
Bear Rating Trainee
Bear Rating Trainee
Posts: 2
Joined: 11 May 2009, 19:39

Re: ttrss_enclosures

Postby Pois » 11 May 2009, 22:34

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 ?

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: ttrss_enclosures

Postby fox » 11 May 2009, 23:25

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. :(


Return to “Development”

Who is online

Users browsing this forum: No registered users and 13 guests