aboutsummaryrefslogtreecommitdiffstats
path: root/sql
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2021-06-02 00:26:51 -0700
committerBryan Newbold <bnewbold@archive.org>2021-06-02 00:26:51 -0700
commit87a9bb4ed81b503f03e6e77d6b082249523e67d4 (patch)
tree791114dd83f83db57e53c74532fe1cc6b0782896 /sql
parent63271ba7e78fede9d9fb71c9022c2fb25fda0f8e (diff)
downloadsandcrawler-87a9bb4ed81b503f03e6e77d6b082249523e67d4.tar.gz
sandcrawler-87a9bb4ed81b503f03e6e77d6b082249523e67d4.zip
crossref DB proposal, and include in SQL schema
Diffstat (limited to 'sql')
-rw-r--r--sql/migrations/2019-12-19-060141_init/up.sql7
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/migrations/2019-12-19-060141_init/up.sql b/sql/migrations/2019-12-19-060141_init/up.sql
index 73bd7f1..10a5183 100644
--- a/sql/migrations/2019-12-19-060141_init/up.sql
+++ b/sql/migrations/2019-12-19-060141_init/up.sql
@@ -175,3 +175,10 @@ CREATE TABLE IF NOT EXISTS shadow (
PRIMARY KEY(shadow_corpus, shadow_id)
);
CREATE INDEX shadow_sha1hex_idx ON shadow(sha1hex);
+
+CREATE TABLE IF NOT EXISTS crossref (
+ doi TEXT NOT NULL CHECK (octet_length(doi) >= 4 AND doi = LOWER(doi)),
+ indexed TIMESTAMP WITH TIME ZONE NOT NULL,
+ record JSON NOT NULL,
+ PRIMARY KEY(doi)
+);