2020-10-29 15:58:45 +00:00
|
|
|
-- SPDX-License-Identifier: MIT
|
|
|
|
-- Copyright 2017 J. King, Dustin Wilson et al.
|
|
|
|
-- See LICENSE and AUTHORS files for details
|
|
|
|
|
2020-11-04 23:34:22 +00:00
|
|
|
-- Please consult the SQLite 3 schemata for commented version
|
|
|
|
|
2020-11-06 16:06:27 +00:00
|
|
|
alter table arsse_tokens add column data longtext default null;
|
|
|
|
|
2020-12-15 01:09:38 +00:00
|
|
|
alter table arsse_subscriptions add column keep_rule longtext default null;
|
|
|
|
alter table arsse_subscriptions add column block_rule longtext default null;
|
2020-12-15 18:20:03 +00:00
|
|
|
alter table arsse_marks add column hidden boolean not null default 0;
|
2020-12-15 01:09:38 +00:00
|
|
|
|
2020-10-30 23:00:11 +00:00
|
|
|
alter table arsse_users add column num bigint unsigned unique;
|
|
|
|
alter table arsse_users add column admin boolean not null default 0;
|
|
|
|
create temporary table arsse_users_existing(
|
|
|
|
id text not null,
|
|
|
|
num serial primary key
|
|
|
|
) character set utf8mb4 collate utf8mb4_unicode_ci;
|
|
|
|
insert into arsse_users_existing(id) select id from arsse_users;
|
|
|
|
update arsse_users as u, arsse_users_existing as n
|
|
|
|
set u.num = n.num
|
|
|
|
where u.id = n.id;
|
|
|
|
drop table arsse_users_existing;
|
|
|
|
alter table arsse_users modify num bigint unsigned not null;
|
2020-10-29 15:58:45 +00:00
|
|
|
|
2020-12-05 16:01:44 +00:00
|
|
|
create table arsse_user_meta(
|
|
|
|
owner varchar(255) not null,
|
|
|
|
"key" varchar(255) not null,
|
2020-12-08 21:10:23 +00:00
|
|
|
modified datetime(0) not null default CURRENT_TIMESTAMP,
|
2020-12-05 16:01:44 +00:00
|
|
|
value longtext,
|
|
|
|
foreign key(owner) references arsse_users(id) on delete cascade on update cascade,
|
2020-12-06 18:17:19 +00:00
|
|
|
primary key(owner,"key")
|
|
|
|
) character set utf8mb4 collate utf8mb4_unicode_ci;
|
2020-12-05 16:01:44 +00:00
|
|
|
|
2021-01-16 19:24:01 +00:00
|
|
|
alter table arsse_subscriptions add column scrape boolean not null default 0;
|
2021-01-17 00:06:20 +00:00
|
|
|
update arsse_subscriptions set scrape = 1 where feed in (select id from arsse_feeds where scrape = 1);
|
2021-01-16 19:24:01 +00:00
|
|
|
alter table arsse_feeds drop column scrape;
|
|
|
|
alter table arsse_articles add column content_scraped longtext;
|
|
|
|
|
2020-11-04 23:34:22 +00:00
|
|
|
create table arsse_icons(
|
|
|
|
id serial primary key,
|
|
|
|
url varchar(767) unique not null,
|
|
|
|
modified datetime(0),
|
|
|
|
etag varchar(255) not null default '',
|
|
|
|
next_fetch datetime(0),
|
|
|
|
orphaned datetime(0),
|
|
|
|
type text,
|
|
|
|
data longblob
|
|
|
|
) character set utf8mb4 collate utf8mb4_unicode_ci;
|
2020-11-06 15:28:28 +00:00
|
|
|
insert into arsse_icons(url) select distinct favicon from arsse_feeds where favicon is not null and favicon <> '';
|
2020-11-04 23:34:22 +00:00
|
|
|
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;
|
|
|
|
alter table arsse_feeds drop column favicon;
|
|
|
|
|
2020-10-29 15:58:45 +00:00
|
|
|
update arsse_meta set value = '7' where "key" = 'schema_version';
|