move ffmpeg command to seperate table
This commit is contained in:
parent
72dfd2408f
commit
cdeb266e38
20 changed files with 245 additions and 84 deletions
|
@ -1,2 +1,2 @@
|
|||
ALTER TABLE files
|
||||
DROP updated_at;
|
||||
DROP IF EXISTS updated_at;
|
1
migrations/000012_create_ffmpeg_commands_table.down.sql
Normal file
1
migrations/000012_create_ffmpeg_commands_table.down.sql
Normal file
|
@ -0,0 +1 @@
|
|||
DROP TABLE IF EXISTS ffmpeg_commands;
|
6
migrations/000012_create_ffmpeg_commands_table.up.sql
Normal file
6
migrations/000012_create_ffmpeg_commands_table.up.sql
Normal file
|
@ -0,0 +1,6 @@
|
|||
CREATE TABLE IF NOT EXISTS ffmpeg_commands(
|
||||
id bigserial PRIMARY KEY,
|
||||
name VARCHAR (50) NOT NULL,
|
||||
data JSONB
|
||||
);
|
||||
|
1
migrations/000013_insert_healthcheck.down.sql
Normal file
1
migrations/000013_insert_healthcheck.down.sql
Normal file
|
@ -0,0 +1 @@
|
|||
DELETE FROM ffmpeg_commands where id = 1;
|
1
migrations/000013_insert_healthcheck.up.sql
Normal file
1
migrations/000013_insert_healthcheck.up.sql
Normal 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"}]}');
|
|
@ -0,0 +1,2 @@
|
|||
ALTER TABLE tasks
|
||||
DROP IF EXISTS ffmpeg_command;
|
2
migrations/000014_alter_task_table_ffmpeg_command.up.sql
Normal file
2
migrations/000014_alter_task_table_ffmpeg_command.up.sql
Normal file
|
@ -0,0 +1,2 @@
|
|||
ALTER TABLE tasks
|
||||
ADD ffmpeg_command_id bigint REFERENCES ffmpeg_commands(id) NOT NULL DEFAULT 1;
|
Loading…
Add table
Add a link
Reference in a new issue