From 8bd715c7ea738746e13601e829121ee38bdac994 Mon Sep 17 00:00:00 2001 From: Seth Call Date: Tue, 17 Dec 2013 19:44:30 +0000 Subject: [PATCH] * VRFS-821 many changes for upload apis, mostly --- db/up/store_s3_filenames.sql | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 db/up/store_s3_filenames.sql diff --git a/db/up/store_s3_filenames.sql b/db/up/store_s3_filenames.sql new file mode 100644 index 000000000..875664d09 --- /dev/null +++ b/db/up/store_s3_filenames.sql @@ -0,0 +1,30 @@ +-- there are no valid recordings and mixes at this time +DELETE FROM recorded_tracks; +DELETE FROM mixes; + +-- store full path to s3 bucket for mix and recorded_track + +ALTER TABLE recorded_tracks ADD COLUMN url varchar(1024) NOT NULL; + +ALTER TABLE mixes ADD COLUMN url varchar(1024) NOT NULL; + +-- greater than 64 bytes come back from amazon for upload ids +ALTER TABLE recorded_tracks ALTER COLUMN upload_id TYPE varchar(1024); + +-- store offset on server +ALTER TABLE recorded_tracks ADD COLUMN file_offset bigint DEFAULT 0; + +-- make length be a bigint, since it can in theory be that large +ALTER TABLE recorded_tracks ALTER COLUMN length TYPE bigint; + +-- store the client's track_id in addition to our own +ALTER TABLE recorded_tracks ADD COLUMN client_track_id varchar(64) NOT NULL; + +-- is a part being stored +ALTER TABLE recorded_tracks ADD COLUMN is_part_uploading BOOLEAN NOT NULL DEFAULT false; + +-- track error counts for the recorded_track as whole +ALTER TABLE recorded_tracks ADD COLUMN upload_failures int NOT NULL DEFAULT 0; + +-- track error counts for the current part +ALTER TABLE recorded_tracks ADD COLUMN part_failures int NOT NULL DEFAULT 0;