aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-12-26 22:49:41 -0800
committerBryan Newbold <bnewbold@robocracy.org>2018-12-26 22:49:41 -0800
commit892b102d3c24cdde448d36c6ced35a75e368fe8c (patch)
treea002bcf82053f3d0baaa116d5259d97e9a9fe580
parent2089289d7d34c16d9530699f4635ff0f69d7d556 (diff)
downloadfatcat-892b102d3c24cdde448d36c6ced35a75e368fe8c.tar.gz
fatcat-892b102d3c24cdde448d36c6ced35a75e368fe8c.zip
webcapture: status_code nullable; cdx timestamp string
-rw-r--r--fatcat-openapi2.yml6
-rw-r--r--rust/migrations/2018-05-12-001226_init/up.sql4
2 files changed, 4 insertions, 6 deletions
diff --git a/fatcat-openapi2.yml b/fatcat-openapi2.yml
index 3eada7e4..eb0528d5 100644
--- a/fatcat-openapi2.yml
+++ b/fatcat-openapi2.yml
@@ -238,16 +238,14 @@ definitions:
- surt
- timestamp
- url
- - status_code
- sha1
properties:
surt:
type: string
example: "org,asheesh)/apus/ch1/node15.html"
timestamp:
- type: integer
- example: 20020429162520
- format: int64
+ type: string
+ example: "20020429162520"
url:
type: string
example: "http://www.asheesh.org:80/APUS/ch1/node15.html"
diff --git a/rust/migrations/2018-05-12-001226_init/up.sql b/rust/migrations/2018-05-12-001226_init/up.sql
index 9b6a00a6..eadc2e8a 100644
--- a/rust/migrations/2018-05-12-001226_init/up.sql
+++ b/rust/migrations/2018-05-12-001226_init/up.sql
@@ -256,10 +256,10 @@ CREATE TABLE webcapture_rev_cdx (
id BIGSERIAL PRIMARY KEY,
webcapture_rev UUID REFERENCES webcapture_rev(id) NOT NULL,
surt TEXT NOT NULL,
- timestamp BIGINT NOT NULL, -- TODO: timestamp type, or text?
+ timestamp TEXT NOT NULL, -- TODO: timestamp type?
url TEXT NOT NULL,
mimetype TEXT,
- status_code BIGINT NOT NULL,
+ status_code BIGINT,
sha1 TEXT CHECK(octet_length(sha1) = 40) NOT NULL,
sha256 TEXT CHECK(octet_length(sha256) = 64)
-- could extend with: language (detection), simhash, redirect