mirror of
https://code.mensbeam.com/MensBeam/Arsse.git
synced 2024-12-22 13:12:41 +00:00
Excluse empty-string URLs from icons table
This commit is contained in:
parent
424b14d2b4
commit
8f739cec85
3 changed files with 3 additions and 3 deletions
|
@ -30,7 +30,7 @@ create table arsse_icons(
|
|||
type text,
|
||||
data longblob
|
||||
) character set utf8mb4 collate utf8mb4_unicode_ci;
|
||||
insert into arsse_icons(url) select distinct favicon from arsse_feeds where favicon is not null;
|
||||
insert into arsse_icons(url) select distinct favicon from arsse_feeds where favicon is not null and favicon <> '';
|
||||
alter table arsse_feeds add column icon bigint unsigned;
|
||||
alter table arsse_feeds add constraint foreign key (icon) references arsse_icons(id) on delete set null;
|
||||
update arsse_feeds as f, arsse_icons as i set f.icon = i.id where f.favicon = i.url;
|
||||
|
|
|
@ -31,7 +31,7 @@ create table arsse_icons(
|
|||
type text,
|
||||
data bytea
|
||||
);
|
||||
insert into arsse_icons(url) select distinct favicon from arsse_feeds where favicon is not null;
|
||||
insert into arsse_icons(url) select distinct favicon from arsse_feeds where favicon is not null and favicon <> '';
|
||||
alter table arsse_feeds add column icon bigint references arsse_icons(id) on delete set null;
|
||||
update arsse_feeds as f set icon = i.id from arsse_icons as i where f.favicon = i.url;
|
||||
alter table arsse_feeds drop column favicon;
|
||||
|
|
|
@ -40,7 +40,7 @@ create table arsse_icons(
|
|||
type text, -- the Content-Type of the icon, if known
|
||||
data blob -- the binary data of the icon itself
|
||||
);
|
||||
insert into arsse_icons(url) select distinct favicon from arsse_feeds where favicon is not null;
|
||||
insert into arsse_icons(url) select distinct favicon from arsse_feeds where favicon is not null and favicon <> '';
|
||||
create table arsse_feeds_new(
|
||||
-- newsfeeds, deduplicated
|
||||
-- users have subscriptions to these feeds in another table
|
||||
|
|
Loading…
Reference in a new issue