aboutsummaryrefslogtreecommitdiffstats
path: root/rust/migrations
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-12-26 15:11:58 -0800
committerBryan Newbold <bnewbold@robocracy.org>2018-12-26 15:11:58 -0800
commit2f2249f0214911443523b2fb9233201036e5f38d (patch)
tree339c1f5b393aa4471b331cfe8d5f667bd935c4a5 /rust/migrations
parent36ce50acc6f44d9f504531571eea8755d723acc5 (diff)
downloadfatcat-2f2249f0214911443523b2fb9233201036e5f38d.tar.gz
fatcat-2f2249f0214911443523b2fb9233201036e5f38d.zip
sql: size_bytes (size is a keyword)
Diffstat (limited to 'rust/migrations')
-rw-r--r--rust/migrations/2018-05-12-001226_init/up.sql4
1 files changed, 2 insertions, 2 deletions
diff --git a/rust/migrations/2018-05-12-001226_init/up.sql b/rust/migrations/2018-05-12-001226_init/up.sql
index 57209d2c..25849912 100644
--- a/rust/migrations/2018-05-12-001226_init/up.sql
+++ b/rust/migrations/2018-05-12-001226_init/up.sql
@@ -142,7 +142,7 @@ CREATE TABLE file_rev (
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
extra_json JSONB,
- size BIGINT,
+ size_bytes BIGINT,
-- fixed size hashes (in hex). TODO: switch to binary type type
sha1 TEXT CHECK(octet_length(sha1) = 40),
sha256 TEXT CHECK(octet_length(sha256) = 64),
@@ -511,7 +511,7 @@ INSERT INTO creator_edit (ident_id, rev_id, redirect_id, editgroup_id, prev_rev)
('00000000-0000-0000-2222-000000000003', '00000000-0000-0000-2222-FFF000000003', null, '00000000-0000-0000-BBBB-000000000003', null),
('00000000-0000-0000-2222-000000000004', '00000000-0000-0000-2222-FFF000000002', null, '00000000-0000-0000-BBBB-000000000004', '00000000-0000-0000-2222-FFF000000003');
-INSERT INTO file_rev (id, size, sha1, sha256, md5, mimetype) VALUES
+INSERT INTO file_rev (id, size_bytes, sha1, sha256, md5, mimetype) VALUES
('00000000-0000-0000-3333-FFF000000001', null, null, null, null, null),
('00000000-0000-0000-3333-FFF000000002', 4321, '7d97e98f8af710c7e7fe703abc8f639e0ee507c4', null, null, 'text/plain'),
('00000000-0000-0000-3333-FFF000000003', 255629, '3f242a192acc258bdfdb151943419437f440c313', 'ffc1005680cb620eec4c913437dfabbf311b535cfe16cbaeb2faec1f92afc362', 'f4de91152c7ab9fdc2a128f962faebff', 'application/pdf');