summaryrefslogtreecommitdiff
path: root/schema.sql
blob: e67e980cb62af73c3cfc3625a9fb8ede67509418 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
drop table if exists epube_pagination;
drop table if exists epube_books;
drop table if exists epube_users;
drop table if exists epube_sessions;
drop table if exists epube_favorites;

drop index if exists epube_sessions_expire;

create table epube_pagination(
	id integer not null primary key autoincrement,
	bookid integer not null,
	total_pages integer not null,
	pagination text not null);

create table epube_books(
	id integer not null primary key autoincrement,
	bookid integer not null,
	owner varchar(200) not null,
	lastts integer not null,
	lastcfi varchar(200) not null,
	lastread integer not null);

create table epube_users(
	id integer not null primary key autoincrement,
	user varchar(100) not null,
	pass varchar(200) not null);

create table epube_sessions (
	id varchar(250) not null primary key,
	data text,
	expire integer not null);

create table epube_favorites(
	id integer not null primary key autoincrement,
	bookid integer not null,
	owner varchar(200) not null);


create index epube_sessions_expire on epube_sessions(expire);