1
1
Fork 0
mirror of https://code.mensbeam.com/MensBeam/Arsse.git synced 2024-12-23 09:02:41 +00:00
Arsse/sql/MySQL/1.sql

34 lines
1.3 KiB
MySQL
Raw Normal View History

-- 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;
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;
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;
alter table arsse_marks add column note longtext;
update arsse_meta set value = '2' where `key` = 'schema_version';