Mirroring what happens on image table. Bug: T279982 Change-Id: Ib67c32b10d3b88e09514d8fbb5dcb4f977108ba2
363 lines
6.8 KiB
JSON
363 lines
6.8 KiB
JSON
{
|
|
"comment": "Add index on oi_timestamp (T279982)",
|
|
"before": {
|
|
"name": "oldimage",
|
|
"comment": "Previous revisions of uploaded files. Awkwardly, image rows have to be moved into this table at re-upload time.",
|
|
"columns": [
|
|
{
|
|
"name": "oi_name",
|
|
"comment": "Base filename: key to image.img_name",
|
|
"type": "binary",
|
|
"options": {
|
|
"notnull": true,
|
|
"default": "",
|
|
"length": 255
|
|
}
|
|
},
|
|
{
|
|
"name": "oi_archive_name",
|
|
"comment": "Filename of the archived file. This is generally a timestamp and '!' prepended to the base name.",
|
|
"type": "binary",
|
|
"options": {
|
|
"notnull": true,
|
|
"default": "",
|
|
"length": 255
|
|
}
|
|
},
|
|
{
|
|
"name": "oi_size",
|
|
"type": "integer",
|
|
"options": {
|
|
"unsigned": true,
|
|
"notnull": true,
|
|
"default": 0
|
|
}
|
|
},
|
|
{
|
|
"name": "oi_width",
|
|
"type": "integer",
|
|
"options": {
|
|
"notnull": true,
|
|
"default": 0
|
|
}
|
|
},
|
|
{
|
|
"name": "oi_height",
|
|
"type": "integer",
|
|
"options": {
|
|
"notnull": true,
|
|
"default": 0
|
|
}
|
|
},
|
|
{
|
|
"name": "oi_bits",
|
|
"type": "integer",
|
|
"options": {
|
|
"notnull": true,
|
|
"default": 0
|
|
}
|
|
},
|
|
{
|
|
"name": "oi_description_id",
|
|
"type": "bigint",
|
|
"options": {
|
|
"unsigned": true,
|
|
"notnull": true
|
|
}
|
|
},
|
|
{
|
|
"name": "oi_actor",
|
|
"type": "bigint",
|
|
"options": {
|
|
"unsigned": true,
|
|
"notnull": true
|
|
}
|
|
},
|
|
{
|
|
"name": "oi_timestamp",
|
|
"type": "mwtimestamp",
|
|
"options": {
|
|
"notnull": true,
|
|
"length": 14
|
|
}
|
|
},
|
|
{
|
|
"name": "oi_metadata",
|
|
"type": "blob",
|
|
"options": {
|
|
"notnull": true,
|
|
"length": 16777215
|
|
}
|
|
},
|
|
{
|
|
"name": "oi_media_type",
|
|
"type": "mwenum",
|
|
"options": {
|
|
"notnull": false,
|
|
"default": null,
|
|
"CustomSchemaOptions": {
|
|
"enum_values": [ "UNKNOWN", "BITMAP", "DRAWING", "AUDIO", "VIDEO", "MULTIMEDIA", "OFFICE", "TEXT", "EXECUTABLE", "ARCHIVE", "3D" ]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "oi_major_mime",
|
|
"type": "mwenum",
|
|
"options": {
|
|
"notnull": true,
|
|
"default": "unknown",
|
|
"CustomSchemaOptions": {
|
|
"enum_values": [ "unknown", "application", "audio", "image", "text", "video", "message", "model", "multipart", "chemical" ]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "oi_minor_mime",
|
|
"type": "binary",
|
|
"options": {
|
|
"notnull": true,
|
|
"default": "unknown",
|
|
"length": 100
|
|
}
|
|
},
|
|
{
|
|
"name": "oi_deleted",
|
|
"type": "mwtinyint",
|
|
"options": {
|
|
"unsigned": true,
|
|
"notnull": true,
|
|
"default": 0
|
|
}
|
|
},
|
|
{
|
|
"name": "oi_sha1",
|
|
"type": "binary",
|
|
"options": {
|
|
"notnull": true,
|
|
"default": "",
|
|
"length": 32
|
|
}
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "oi_actor_timestamp",
|
|
"columns": [
|
|
"oi_actor",
|
|
"oi_timestamp"
|
|
],
|
|
"unique": false
|
|
},
|
|
{
|
|
"name": "oi_name_timestamp",
|
|
"columns": [
|
|
"oi_name",
|
|
"oi_timestamp"
|
|
],
|
|
"unique": false
|
|
},
|
|
{
|
|
"name": "oi_name_archive_name",
|
|
"comment": "oi_archive_name truncated to 14 to avoid key length overflow",
|
|
"columns": [
|
|
"oi_name",
|
|
"oi_archive_name"
|
|
],
|
|
"unique": false,
|
|
"options": { "lengths": [ null, 14 ] }
|
|
},
|
|
{
|
|
"name": "oi_sha1",
|
|
"columns": [
|
|
"oi_sha1"
|
|
],
|
|
"unique": false,
|
|
"options": { "lengths": [ 10 ] }
|
|
}
|
|
]
|
|
},
|
|
"after": {
|
|
"name": "oldimage",
|
|
"comment": "Previous revisions of uploaded files. Awkwardly, image rows have to be moved into this table at re-upload time.",
|
|
"columns": [
|
|
{
|
|
"name": "oi_name",
|
|
"comment": "Base filename: key to image.img_name",
|
|
"type": "binary",
|
|
"options": {
|
|
"notnull": true,
|
|
"default": "",
|
|
"length": 255
|
|
}
|
|
},
|
|
{
|
|
"name": "oi_archive_name",
|
|
"comment": "Filename of the archived file. This is generally a timestamp and '!' prepended to the base name.",
|
|
"type": "binary",
|
|
"options": {
|
|
"notnull": true,
|
|
"default": "",
|
|
"length": 255
|
|
}
|
|
},
|
|
{
|
|
"name": "oi_size",
|
|
"type": "integer",
|
|
"options": {
|
|
"unsigned": true,
|
|
"notnull": true,
|
|
"default": 0
|
|
}
|
|
},
|
|
{
|
|
"name": "oi_width",
|
|
"type": "integer",
|
|
"options": {
|
|
"notnull": true,
|
|
"default": 0
|
|
}
|
|
},
|
|
{
|
|
"name": "oi_height",
|
|
"type": "integer",
|
|
"options": {
|
|
"notnull": true,
|
|
"default": 0
|
|
}
|
|
},
|
|
{
|
|
"name": "oi_bits",
|
|
"type": "integer",
|
|
"options": {
|
|
"notnull": true,
|
|
"default": 0
|
|
}
|
|
},
|
|
{
|
|
"name": "oi_description_id",
|
|
"type": "bigint",
|
|
"options": {
|
|
"unsigned": true,
|
|
"notnull": true
|
|
}
|
|
},
|
|
{
|
|
"name": "oi_actor",
|
|
"type": "bigint",
|
|
"options": {
|
|
"unsigned": true,
|
|
"notnull": true
|
|
}
|
|
},
|
|
{
|
|
"name": "oi_timestamp",
|
|
"type": "mwtimestamp",
|
|
"options": {
|
|
"notnull": true,
|
|
"length": 14
|
|
}
|
|
},
|
|
{
|
|
"name": "oi_metadata",
|
|
"type": "blob",
|
|
"options": {
|
|
"notnull": true,
|
|
"length": 16777215
|
|
}
|
|
},
|
|
{
|
|
"name": "oi_media_type",
|
|
"type": "mwenum",
|
|
"options": {
|
|
"notnull": false,
|
|
"default": null,
|
|
"CustomSchemaOptions": {
|
|
"enum_values": [ "UNKNOWN", "BITMAP", "DRAWING", "AUDIO", "VIDEO", "MULTIMEDIA", "OFFICE", "TEXT", "EXECUTABLE", "ARCHIVE", "3D" ]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "oi_major_mime",
|
|
"type": "mwenum",
|
|
"options": {
|
|
"notnull": true,
|
|
"default": "unknown",
|
|
"CustomSchemaOptions": {
|
|
"enum_values": [ "unknown", "application", "audio", "image", "text", "video", "message", "model", "multipart", "chemical" ]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "oi_minor_mime",
|
|
"type": "binary",
|
|
"options": {
|
|
"notnull": true,
|
|
"default": "unknown",
|
|
"length": 100
|
|
}
|
|
},
|
|
{
|
|
"name": "oi_deleted",
|
|
"type": "mwtinyint",
|
|
"options": {
|
|
"unsigned": true,
|
|
"notnull": true,
|
|
"default": 0
|
|
}
|
|
},
|
|
{
|
|
"name": "oi_sha1",
|
|
"type": "binary",
|
|
"options": {
|
|
"notnull": true,
|
|
"default": "",
|
|
"length": 32
|
|
}
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "oi_actor_timestamp",
|
|
"columns": [
|
|
"oi_actor",
|
|
"oi_timestamp"
|
|
],
|
|
"unique": false
|
|
},
|
|
{
|
|
"name": "oi_name_timestamp",
|
|
"columns": [
|
|
"oi_name",
|
|
"oi_timestamp"
|
|
],
|
|
"unique": false
|
|
},
|
|
{
|
|
"name": "oi_name_archive_name",
|
|
"comment": "oi_archive_name truncated to 14 to avoid key length overflow",
|
|
"columns": [
|
|
"oi_name",
|
|
"oi_archive_name"
|
|
],
|
|
"unique": false,
|
|
"options": { "lengths": [ null, 14 ] }
|
|
},
|
|
{
|
|
"name": "oi_sha1",
|
|
"columns": [
|
|
"oi_sha1"
|
|
],
|
|
"unique": false,
|
|
"options": { "lengths": [ 10 ] }
|
|
},
|
|
{
|
|
"name": "oi_timestamp",
|
|
"comment": "Used by Special:ListFiles",
|
|
"columns": [
|
|
"oi_timestamp"
|
|
],
|
|
"unique": false
|
|
}
|
|
]
|
|
}
|
|
}
|