fix mail e converted video flag
This commit is contained in:
23
database/add_video_converted_flag.sql
Normal file
23
database/add_video_converted_flag.sql
Normal file
@@ -0,0 +1,23 @@
|
||||
-- Aggiungi campo per tracciare conversione video
|
||||
-- Esegui questo script per aggiornare il database
|
||||
|
||||
USE pilatesplatform;
|
||||
|
||||
-- Aggiungi colonna video_converted alla tabella lessons
|
||||
ALTER TABLE lessons
|
||||
ADD COLUMN video_converted BOOLEAN DEFAULT FALSE COMMENT 'True se il video è stato convertito in MP4 H.264'
|
||||
AFTER video_platform;
|
||||
|
||||
-- Aggiorna i video esistenti come non convertiti (NULL = da verificare)
|
||||
UPDATE lessons
|
||||
SET video_converted = FALSE
|
||||
WHERE type = 'video'
|
||||
AND video_platform = 'local'
|
||||
AND video_url IS NOT NULL;
|
||||
|
||||
-- Se vuoi marcare i video MP4 esistenti come già convertiti:
|
||||
-- UPDATE lessons
|
||||
-- SET video_converted = TRUE
|
||||
-- WHERE type = 'video'
|
||||
-- AND video_platform = 'local'
|
||||
-- AND video_url LIKE '%.mp4';
|
||||
@@ -48,6 +48,7 @@ CREATE TABLE IF NOT EXISTS lessons (
|
||||
-- Informazioni video
|
||||
video_url VARCHAR(500) DEFAULT NULL COMMENT 'URL video (YouTube, Vimeo, S3, o percorso locale)',
|
||||
video_platform VARCHAR(50) DEFAULT 'local' COMMENT 'Piattaforma: local, youtube, vimeo, s3',
|
||||
video_converted BOOLEAN DEFAULT FALSE COMMENT 'True se il video è stato convertito in MP4 H.264',
|
||||
thumbnail VARCHAR(500) DEFAULT NULL COMMENT 'URL immagine anteprima',
|
||||
duration INT DEFAULT NULL COMMENT 'Durata in minuti',
|
||||
|
||||
|
||||
Reference in New Issue
Block a user