summaryrefslogtreecommitdiff
path: root/resources/sql/sqlite_init.sql
blob: 012e9c6f25cc770346c94cb30bde1aa551de6d35 (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
create table if not exists webmention (
  id integer primary key autoincrement,
  hash text not null unique,
  wm_source text not null,
  wm_target text not null,
  wm_source_domain text not null,
  wm_target_domain text not null,
  wm_source_path text not null,
  wm_target_path text not null,
  lastmod integer not null
);

create table if not exists microformats (
  id integer primary key autoincrement,
  wm_id integer not null,
  mf_type text not null,
  mf_data text not null, /* schema on read, store EDN string here */

  FOREIGN KEY (wm_id)
    references webmention(id)
    on delete cascade
);

create table if not exists proxied_photo (
  id integer primary key autoincrement,
  wm_id integer not null,
  url text not null,

  FOREIGN KEY (wm_id)
    references webmention(id)
    on delete cascade
);