1
1
Fork 0
mirror of https://code.mensbeam.com/MensBeam/Arsse.git synced 2025-01-08 00:42:40 +00:00
Arsse/sql/MySQL/0.sql

114 lines
3.2 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_meta(
2019-03-03 17:10:18 +00:00
"key" varchar(255) primary key,
value longtext
2018-12-15 16:09:46 +00:00
) character set utf8mb4;
create table arsse_users(
id varchar(255) primary key,
password varchar(255),
name varchar(255),
avatar_type varchar(255),
avatar_data longblob,
admin boolean default 0,
rights bigint not null default 0
2018-12-15 16:09:46 +00:00
) character set utf8mb4;
create table arsse_users_meta(
2024-12-27 18:36:54 +00:00
owner varchar(255) not null,
2019-03-03 17:10:18 +00:00
"key" varchar(255) not null,
value varchar(255),
2019-03-03 17:10:18 +00:00
primary key(owner,"key")
2018-12-15 16:09:46 +00:00
) character set utf8mb4;
create table arsse_folders(
id serial primary key,
2024-12-27 18:36:54 +00:00
owner varchar(255) not null,
parent bigint,
name varchar(255) not null,
modified datetime(0) not null default CURRENT_TIMESTAMP, --
unique(owner,name,parent)
2018-12-15 16:09:46 +00:00
) character set utf8mb4;
create table arsse_feeds(
id serial primary key,
url varchar(255) not null,
title varchar(255),
favicon varchar(255),
source varchar(255),
updated datetime(0),
modified datetime(0),
next_fetch datetime(0),
orphaned datetime(0),
etag varchar(255) not null default '',
err_count bigint not null default 0,
err_msg varchar(255),
username varchar(255) not null default '',
password varchar(255) not null default '',
size bigint not null default 0,
scrape boolean not null default 0,
unique(url,username,password)
2018-12-15 16:09:46 +00:00
) character set utf8mb4;
create table arsse_subscriptions(
id serial primary key,
2024-12-27 18:36:54 +00:00
owner varchar(255) not null,
feed bigint not null,
added datetime(0) not null default CURRENT_TIMESTAMP,
modified datetime(0) not null default CURRENT_TIMESTAMP,
title varchar(255),
order_type boolean not null default 0,
pinned boolean not null default 0,
2024-12-27 18:36:54 +00:00
folder bigint,
unique(owner,feed)
2018-12-15 16:09:46 +00:00
) character set utf8mb4;
create table arsse_articles(
id serial primary key,
2024-12-27 18:36:54 +00:00
feed bigint not null,
url varchar(255),
title varchar(255),
author varchar(255),
published datetime(0),
edited datetime(0),
modified datetime(0) not null default CURRENT_TIMESTAMP,
content longtext,
guid varchar(255),
url_title_hash varchar(255) not null,
url_content_hash varchar(255) not null,
title_content_hash varchar(255) not null
2018-12-15 16:09:46 +00:00
) character set utf8mb4;
create table arsse_enclosures(
2024-12-27 18:36:54 +00:00
article bigint not null,
url varchar(255),
type varchar(255)
2018-12-15 16:09:46 +00:00
) character set utf8mb4;
create table arsse_marks(
2024-12-27 18:36:54 +00:00
article bigint not null,
subscription bigint not null,
2019-03-03 17:10:18 +00:00
"read" boolean not null default 0,
starred boolean not null default 0,
modified datetime(0) not null default CURRENT_TIMESTAMP,
primary key(article,subscription)
2018-12-15 16:09:46 +00:00
) character set utf8mb4;
create table arsse_editions(
id serial primary key,
2024-12-27 18:36:54 +00:00
article bigint not null,
modified datetime(0) not null default CURRENT_TIMESTAMP
2018-12-15 16:09:46 +00:00
) character set utf8mb4;
create table arsse_categories(
2024-12-27 18:36:54 +00:00
article bigint not null,
name varchar(255)
2018-12-15 16:09:46 +00:00
) character set utf8mb4;
2019-03-03 17:10:18 +00:00
insert into arsse_meta("key",value) values('schema_version','1');