From e54fe121259a66d90f360a8bd43d9f3a82bee4cb Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Sat, 20 Jun 2026 08:53:23 -0400 Subject: [PATCH] migration --- .../down.sql | 6 ++++++ .../up.sql | 6 ++++++ _database/sql/migrations_squashed/uploaded_videos.sql | 3 +++ 3 files changed, 15 insertions(+) create mode 100644 _database/sql/migrations/2026-06-20-124827-0000_alter_uploaded_videos_add_filename/down.sql create mode 100644 _database/sql/migrations/2026-06-20-124827-0000_alter_uploaded_videos_add_filename/up.sql diff --git a/_database/sql/migrations/2026-06-20-124827-0000_alter_uploaded_videos_add_filename/down.sql b/_database/sql/migrations/2026-06-20-124827-0000_alter_uploaded_videos_add_filename/down.sql new file mode 100644 index 0000000000..0441977c29 --- /dev/null +++ b/_database/sql/migrations/2026-06-20-124827-0000_alter_uploaded_videos_add_filename/down.sql @@ -0,0 +1,6 @@ +-- noinspection SqlDialectInspectionForFile +-- noinspection SqlNoDataSourceInspectionForFile +-- noinspection SqlResolveForFile + +ALTER TABLE uploaded_videos + DROP COLUMN maybe_filename; diff --git a/_database/sql/migrations/2026-06-20-124827-0000_alter_uploaded_videos_add_filename/up.sql b/_database/sql/migrations/2026-06-20-124827-0000_alter_uploaded_videos_add_filename/up.sql new file mode 100644 index 0000000000..3b01e811c5 --- /dev/null +++ b/_database/sql/migrations/2026-06-20-124827-0000_alter_uploaded_videos_add_filename/up.sql @@ -0,0 +1,6 @@ +-- noinspection SqlDialectInspectionForFile +-- noinspection SqlNoDataSourceInspectionForFile +-- noinspection SqlResolveForFile + +ALTER TABLE uploaded_videos + ADD COLUMN maybe_filename VARCHAR(512) DEFAULT NULL AFTER filesize_bytes; diff --git a/_database/sql/migrations_squashed/uploaded_videos.sql b/_database/sql/migrations_squashed/uploaded_videos.sql index 6fd0c27103..3032c7b17a 100644 --- a/_database/sql/migrations_squashed/uploaded_videos.sql +++ b/_database/sql/migrations_squashed/uploaded_videos.sql @@ -16,6 +16,9 @@ CREATE TABLE uploaded_videos ( -- Size of the uploaded file in bytes. filesize_bytes INT(10) UNSIGNED NOT NULL, + -- Original filename of the uploaded clip, as provided by the user. + maybe_filename VARCHAR(512) DEFAULT NULL, + -- Pixel dimensions, when they could be determined. maybe_width INT(10) UNSIGNED DEFAULT NULL, maybe_height INT(10) UNSIGNED DEFAULT NULL,