wiki.techinc.nl/maintenance/archives/patch-image-img_major_mime-default.sql
Amir Sarabadani 9760f5ef89 installer: Set "unknown" for default value of *_major_mime in MySQL
Follow up to Ic45dc1bce796a0 which added a schema change that mistakenly
removes the default value and given that it was done long time ago and
the main patch was removed since then, we can simply add a new patch for
broken cases.

Sqlite and Postgres don't need this change as they didn't get the patch
in the first place.

Also fixing the nullability of these fields.

Bug: T277354
Change-Id: Iced6fc6a7127a33cc171174270eba5cc552c871e
2022-01-03 12:12:44 +01:00

20 lines
646 B
SQL

ALTER TABLE /*_*/image
CHANGE img_major_mime img_major_mime ENUM(
'unknown', 'application', 'audio',
'image', 'text', 'video', 'message',
'model', 'multipart', 'chemical'
) DEFAULT 'unknown' NOT NULL;
ALTER TABLE /*_*/oldimage
CHANGE oi_major_mime oi_major_mime ENUM(
'unknown', 'application', 'audio',
'image', 'text', 'video', 'message',
'model', 'multipart', 'chemical'
) DEFAULT 'unknown' NOT NULL;
ALTER TABLE /*_*/filearchive
CHANGE fa_major_mime fa_major_mime ENUM(
'unknown', 'application', 'audio',
'image', 'text', 'video', 'message',
'model', 'multipart', 'chemical'
) DEFAULT 'unknown';