2018-11-28 19:00:36 +00:00
|
|
|
-- SPDX-License-Identifier: MIT
|
|
|
|
-- Copyright 2017 J. King, Dustin Wilson et al.
|
|
|
|
-- See LICENSE and AUTHORS files for details
|
|
|
|
|
|
|
|
-- Please consult the SQLite 3 schemata for commented version
|
|
|
|
|
|
|
|
create table arsse_sessions (
|
|
|
|
id varchar(255) primary key,
|
|
|
|
created datetime(0) not null default CURRENT_TIMESTAMP,
|
|
|
|
expires datetime(0) not null,
|
|
|
|
`user` varchar(255) not null references arsse_users(id) on delete cascade on update cascade
|
2018-12-15 16:09:46 +00:00
|
|
|
) character set utf8mb4;
|
2018-11-28 19:00:36 +00:00
|
|
|
|
|
|
|
create table arsse_labels (
|
|
|
|
id serial primary key,
|
|
|
|
owner varchar(255) not null references arsse_users(id) on delete cascade on update cascade,
|
|
|
|
name varchar(255) not null,
|
|
|
|
modified datetime(0) not null default CURRENT_TIMESTAMP,
|
|
|
|
unique(owner,name)
|
2018-12-15 16:09:46 +00:00
|
|
|
) character set utf8mb4;
|
2018-11-28 19:00:36 +00:00
|
|
|
|
|
|
|
create table arsse_label_members (
|
|
|
|
label bigint not null references arsse_labels(id) on delete cascade,
|
|
|
|
article bigint not null references arsse_articles(id) on delete cascade,
|
|
|
|
subscription bigint not null references arsse_subscriptions(id) on delete cascade,
|
|
|
|
assigned boolean not null default 1,
|
|
|
|
modified datetime(0) not null default CURRENT_TIMESTAMP,
|
|
|
|
primary key(label,article)
|
2018-12-15 16:09:46 +00:00
|
|
|
) character set utf8mb4;
|
2018-11-28 19:00:36 +00:00
|
|
|
|
2018-12-21 01:50:56 +00:00
|
|
|
alter table arsse_marks add column note longtext;
|
2018-11-28 19:00:36 +00:00
|
|
|
|
|
|
|
update arsse_meta set value = '2' where `key` = 'schema_version';
|