aboutsummaryrefslogtreecommitdiff
path: root/db/user/init.sql
blob: 1d0e830fd038d767f19b497168016ff748a5ce21 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
create table if not exists user (
	id integer primary key autoincrement,
	username text not null,
	unique(username)
);

create table if not exists sort_overlay (
	id integer primary key autoincrement,
	user_id int not null default 0,
	expression text not null,
	reading text not null,
	sort int not null,
	foreign key(user_id) references user(id),
	unique(user_id, expression, reading) on conflict replace
);