fit: complete lab4, fix P1.1-P1.3, add Track 1 presigned
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
-- Track 1: presigned PUT lands in staging/; complete copies to attachments/.
|
||||
-- Existing rows keep the old key as staging so in-flight sessions still resolve.
|
||||
ALTER TABLE direct_uploads ADD COLUMN staging_key text;
|
||||
|
||||
UPDATE direct_uploads
|
||||
SET staging_key = s3_key
|
||||
WHERE staging_key IS NULL;
|
||||
|
||||
ALTER TABLE direct_uploads ALTER COLUMN staging_key SET NOT NULL;
|
||||
|
||||
ALTER TABLE direct_uploads
|
||||
ADD CONSTRAINT direct_uploads_staging_key_key UNIQUE (staging_key);
|
||||
Reference in New Issue
Block a user