aboutsummaryrefslogtreecommitdiffstats
path: root/extra/journal_metadata/chocula_schema.sql
blob: 015b46b76dcd9cd4abfaf758fbea78cf6fa4658a (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88


CREATE TABLE IF NOT EXISTS journal_summary
    (issnl TEXT NOT NULL PRIMARY KEY,
     issne TEXT,
     issnp TEXT,
     fatcat_ident TEXT,
     name TEXT,
     publisher TEXT,
     country TEXT,
     lang TEXT,
     publisher_type TEXT,
     is_active BOOLEAN,
     is_oa BOOLEAN default false,
     is_longtail BOOLEAN default false,
     vor_pdf BOOLEAN,
     vor_html BOOLEAN,
     vor_jats BOOLEAN,
     has_dois BOOLEAN,
     any_live_homepage BOOLEAN,
     any_preservation BOOLEAN,
     any_ia BOOLEAN
    );

CREATE TABLE IF NOT EXISTS journal_index
    (issnl TEXT NOT NULL,
     slug TEXT NOT NULL,
     identifier TEXT,
     name TEXT,
     work_count INTEGER,
     extra TEXT,
     PRIMARY KEY(issnl, slug)
    );

CREATE TABLE IF NOT EXISTS fatcat_container
    (issnl TEXT NOT NULL PRIMARY KEY,
     ident TEXT NOT NULL,
     revision TEXT NOT NULL,
     issne TEXT,
     issnp TEXT,
     wikidata_qid TEXT,
     name TEXT,
     container_type TEXT,
     publisher TEXT,
     country TEXT,
     lang TEXT,
     release_count INTEGER,
     ia_count INTEGER,
     ia_frac FLOAT,
     kbart_count INTEGER,
     kbart_frac FLOAT,
     preserved_count INTEGER,
     preserved_frac FLOAT
    );

CREATE TABLE IF NOT EXISTS homepage
    (id INTEGER PRIMARY KEY,
     issnl TEXT NOT NULL,
     surt TEXT NOT NULL,
     url TEXT NOT NULL,
     host TEXT NOT NULL,
     domain TEXT NOT NULL,
     suffix TEXT NOT NULL,
     status_code INTEGER,
     terminal_url TEXT,
     terminal_status_code INTEGER,
     platform_software TEXT,
     scope TEXT,
     has_issn BOOLEAN,
     blocked BOOLEAN,
     UNIQUE(issnl, surt)
    );
CREATE INDEX IF NOT EXISTS homepage_url_idx ON homepage(url);
    
CREATE TABLE IF NOT EXISTS fulltext_pattern
    (id INTEGER PRIMARY KEY,
     issnl TEXT NOT NULL,
     surt_glob TEXT,
     mimetype TEXT,
     state_date TEXT,
     end_date TEXT
    );

CREATE TABLE IF NOT EXISTS title 
    (id INTEGER PRIMARY KEY,
     issnl TEXT NOT NULL,
     title TEXT NOT NULL
    );