-- This file is automatically generated using maintenance/generateSchemaSql.php.
-- Source: ./tables.json
-- Do not modify this file directly.
-- See https://www.mediawiki.org/wiki/Manual:Schema_changes
CREATE TABLE transcode (
  transcode_id SERIAL NOT NULL,
  transcode_image_name VARCHAR(255) NOT NULL,
  transcode_key VARCHAR(48) NOT NULL,
  transcode_error TEXT NOT NULL,
  transcode_time_addjob TIMESTAMPTZ DEFAULT NULL,
  transcode_time_startwork TIMESTAMPTZ DEFAULT NULL,
  transcode_time_success TIMESTAMPTZ DEFAULT NULL,
  transcode_time_error TIMESTAMPTZ DEFAULT NULL,
  transcode_final_bitrate INT NOT NULL,
  PRIMARY KEY(transcode_id)
);

CREATE INDEX transcode_time_inx ON transcode (
  transcode_time_addjob, transcode_time_startwork,
  transcode_time_success, transcode_time_error
);

CREATE INDEX transcode_key_idx ON transcode (transcode_key);

CREATE UNIQUE INDEX transcode_name_key ON transcode (
  transcode_image_name, transcode_key
);
