[
	{
		"name": "transcode",
		"columns": [
			{
				"name": "transcode_id",
				"type": "integer",
				"options": { "notnull": true, "autoincrement": true }
			},
			{
				"name": "transcode_image_name",
				"type": "string",
				"options": { "notnull": true, "length": 255 }
			},
			{
				"name": "transcode_key",
				"type": "string",
				"options": { "notnull": true, "length": 48 }
			},
			{
				"name": "transcode_error",
				"type": "string",
				"options": { "notnull": true, "length": 4294967295 }
			},
			{
				"name": "transcode_time_addjob",
				"type": "mwtimestamp",
				"options": { "notnull": false }
			},
			{
				"name": "transcode_time_startwork",
				"type": "mwtimestamp",
				"options": { "notnull": false }
			},
			{
				"name": "transcode_time_success",
				"type": "mwtimestamp",
				"options": { "notnull": false }
			},
			{
				"name": "transcode_time_error",
				"type": "mwtimestamp",
				"options": { "notnull": false }
			},
			{
				"name": "transcode_final_bitrate",
				"type": "integer",
				"options": { "notnull": true }
			},
			{
				"name": "transcode_state",
				"comment": "Enumerated state of the transcode.",
				"type": "smallint",
				"options": { "notnull": false }
			},
			{
				"name": "transcode_touched",
				"comment": "Time the transcode was last touched, even if it did not yet succeed.",
				"type": "mwtimestamp",
				"options": { "notnull": false }
			},
			{
				"name": "transcode_size",
				"comment": "Size in bytes of transcoded output file. Note some long high-resolution video files could exceed 4 GiB.",
				"type": "bigint",
				"options": { "notnull": false }
			}
		],
		"indexes": [
			{
				"name": "transcode_time_inx",
				"columns": [ "transcode_time_addjob", "transcode_time_startwork", "transcode_time_success", "transcode_time_error" ],
				"unique": false
			},
			{
				"name": "transcode_key_idx",
				"columns": [ "transcode_key" ],
				"unique": false
			},
			{
				"name": "transcode_name_key",
				"columns": [ "transcode_image_name", "transcode_key" ],
				"unique": true
			},
			{
				"name": "transcode_state_touched",
				"comment": "Used for pulling recently changed items in each state category.",
				"columns": [ "transcode_state", "transcode_touched" ],
				"unique": false
			},
			{
				"name": "transcode_state_key_touched",
				"comment": "Used for computing breakdowns by state and transcode format.",
				"columns": [ "transcode_state", "transcode_key", "transcode_touched" ],
				"unique": false
			}
		],
		"pk": [ "transcode_id" ]
	}
]
