aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-01-29 15:44:52 -0800
committerBryan Newbold <bnewbold@robocracy.org>2019-01-29 15:44:54 -0800
commitd010db9791bc187153dda1855059999a500ee3ad (patch)
tree7a3bffb4fd280e44f4eafa0621158461279202bb
parent6326f7e7941e62e9b374ddfc0447c98436242f5c (diff)
downloadfatcat-d010db9791bc187153dda1855059999a500ee3ad.tar.gz
fatcat-d010db9791bc187153dda1855059999a500ee3ad.zip
be less arbitrary about octet_length checks: mostly just >= 1
We're just checking that strings aren't empty, not that they have any particular length.
-rw-r--r--rust/migrations/2019-01-01-000000_init/up.sql4
1 files changed, 2 insertions, 2 deletions
diff --git a/rust/migrations/2019-01-01-000000_init/up.sql b/rust/migrations/2019-01-01-000000_init/up.sql
index 2bb3f4ec..eabb201e 100644
--- a/rust/migrations/2019-01-01-000000_init/up.sql
+++ b/rust/migrations/2019-01-01-000000_init/up.sql
@@ -80,7 +80,7 @@ CREATE INDEX changelog_editgroup_idx ON changelog(editgroup_id);
CREATE TABLE abstracts (
-- fixed size hash (in hex). TODO: switch to bytes
sha1 TEXT PRIMARY KEY CHECK (octet_length(sha1) = 40),
- content TEXT NOT NULL CHECK (octet_length(content) >= 8)
+ content TEXT NOT NULL CHECK (octet_length(content) >= 1)
);
CREATE TABLE refs_blob (
@@ -183,7 +183,7 @@ CREATE TABLE file_rev (
sha1 TEXT CHECK (octet_length(sha1) = 40),
sha256 TEXT CHECK (octet_length(sha256) = 64),
md5 TEXT CHECK (octet_length(md5) = 32),
- mimetype TEXT CHECK (octet_length(mimetype) >= 3)
+ mimetype TEXT CHECK (octet_length(mimetype) >= 1)
);
CREATE INDEX file_rev_sha1_idx ON file_rev(sha1);