mirror of
https://code.mensbeam.com/MensBeam/Arsse.git
synced 2024-12-22 21:22:40 +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,
|
type text,
|
||||||
data longblob
|
data longblob
|
||||||
) character set utf8mb4 collate utf8mb4_unicode_ci;
|
) 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 column icon bigint unsigned;
|
||||||
alter table arsse_feeds add constraint foreign key (icon) references arsse_icons(id) on delete set null;
|
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;
|
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,
|
type text,
|
||||||
data bytea
|
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;
|
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;
|
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;
|
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
|
type text, -- the Content-Type of the icon, if known
|
||||||
data blob -- the binary data of the icon itself
|
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(
|
create table arsse_feeds_new(
|
||||||
-- newsfeeds, deduplicated
|
-- newsfeeds, deduplicated
|
||||||
-- users have subscriptions to these feeds in another table
|
-- users have subscriptions to these feeds in another table
|
||||||
|
|
Loading…
Reference in a new issue