simplify media_uploads schema

This commit is contained in:
Brandon Thomas committed 2023-04-23 04:31:00 -07:00
1 parent 3564c1b459
commit ca59189dd9
3 files changed
+19 -8

No files matched your search

@@ -0,0 +1,10 @@
-- noinspection SqlDialectInspectionForFile
-- noinspection SqlNoDataSourceInspectionForFile
-- noinspection SqlResolveForFile
ALTER TABLE media_uploads
ADD COLUMN public_bucket_directory_full_path VARCHAR(255) NOT NULL
AFTER public_bucket_directory_hash;
ALTER TABLE media_uploads
RENAME COLUMN maybe_extra_file_modification_info TO extra_file_modification_info ;
@@ -0,0 +1,8 @@
-- noinspection SqlDialectInspectionForFile
-- noinspection SqlNoDataSourceInspectionForFile
-- noinspection SqlResolveForFile
ALTER TABLE media_uploads DROP COLUMN public_bucket_directory_full_path;
ALTER TABLE media_uploads
RENAME COLUMN extra_file_modification_info TO maybe_extra_file_modification_info;
+1 -8
View File
@@ -64,17 +64,10 @@ CREATE TABLE media_uploads (
-- as well as any transcodings, downsamplings, etc.
public_bucket_directory_hash VARCHAR(32) NOT NULL,
-- TODO(bt, 2022-12-20): Before landing, rename this field be better and indicate this
-- is a *directory*. Add a second field to contain the default file name.
-- The directory this media is uploaded to will be exclusive for this file.
-- Only this given record will live in this bucket, but the directory may include
-- other transcodings or truncations.
public_bucket_directory_full_path VARCHAR(255) NOT NULL,
-- We'll likely transcode (and potentially truncate) most media given to us.
-- This will store a json-encoded struct that details the changes.
-- TEXT = 65,535 bytes (64 KiB), ~= 4 bytes per UTF-8 character, ~ 16383 characters.
extra_file_modification_info TEXT DEFAULT NULL,
maybe_extra_file_modification_info TEXT DEFAULT NULL,
-- ========== CREATOR DETAILS AND PREFERENCES ==========