From 7f30c187b78869e3ab9dd9f947c53e96f837f01c Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Mon, 5 Aug 2024 01:16:00 +0200 Subject: [PATCH] Fix sha varchar length in db --- transcoder/migrations/000001_init_db.up.sql | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/transcoder/migrations/000001_init_db.up.sql b/transcoder/migrations/000001_init_db.up.sql index dfccafb8..581d2050 100644 --- a/transcoder/migrations/000001_init_db.up.sql +++ b/transcoder/migrations/000001_init_db.up.sql @@ -1,7 +1,7 @@ begin; create table info( - sha varchar(20) not null primary key, + sha varchar(40) not null primary key, path varchar(4096) not null unique, extension varchar(16), mime_codec varchar(1024), @@ -16,7 +16,7 @@ create table info( ); create table videos( - sha varchar(20) not null references info(sha) on delete cascade, + sha varchar(40) not null references info(sha) on delete cascade, idx integer not null, title varchar(1024), language varchar(256), @@ -32,7 +32,7 @@ create table videos( ); create table audios( - sha varchar(20) not null references info(sha) on delete cascade, + sha varchar(40) not null references info(sha) on delete cascade, idx integer not null, title varchar(1024), language varchar(256), @@ -46,7 +46,7 @@ create table audios( ); create table subtitles( - sha varchar(20) not null references info(sha) on delete cascade, + sha varchar(40) not null references info(sha) on delete cascade, -- Can be null when is_external is true idx integer, title varchar(1024), @@ -62,7 +62,7 @@ create table subtitles( create type chapter_type as enum('content', 'recap', 'intro', 'credits', 'preview'); create table chapters( - sha varchar(20) not null references info(sha) on delete cascade, + sha varchar(40) not null references info(sha) on delete cascade, start_time real not null, end_time real not null, name varchar(1024),