move ffmpeg command to seperate table

This commit is contained in:
Samuel Lorch 2024-06-23 22:47:50 +02:00
parent 72dfd2408f
commit cdeb266e38
20 changed files with 245 additions and 84 deletions

View file

@ -1,2 +1,2 @@
ALTER TABLE files
DROP updated_at;
DROP IF EXISTS updated_at;

View file

@ -0,0 +1 @@
DROP TABLE IF EXISTS ffmpeg_commands;

View file

@ -0,0 +1,6 @@
CREATE TABLE IF NOT EXISTS ffmpeg_commands(
id bigserial PRIMARY KEY,
name VARCHAR (50) NOT NULL,
data JSONB
);

View file

@ -0,0 +1 @@
DELETE FROM ffmpeg_commands where id = 1;

View file

@ -0,0 +1 @@
INSERT INTO ffmpeg_commands (name, data) VALUES ('healthcheck_command','{"args": [{"flag": "-stats", "value": ""}, {"flag": "-v", "value": "error"}, {"flag": "-xerror", "value": ""}], "input_files": [{"args": null, "path": "input.mkv"}], "output_files": [{"args": [{"flag": "-f", "value": "null"}, {"flag": "-max_muxing_queue_size", "value": "9999"}], "path": "output.mkv"}]}');

View file

@ -0,0 +1,2 @@
ALTER TABLE tasks
DROP IF EXISTS ffmpeg_command;

View file

@ -0,0 +1,2 @@
ALTER TABLE tasks
ADD ffmpeg_command_id bigint REFERENCES ffmpeg_commands(id) NOT NULL DEFAULT 1;