2020-01-11, 06:03
(2020-01-10, 08:50)Montellese Wrote: @Milhouse thanks for your support and for the report. You're right that update action is not needed. I also noticed that the column already exists but forgot to remove the update action again. I've removed it and force pushed the branch.
@Montellese the latest version of the PR is better, but still fails during the database upgrade: http://ix.io/275k
This time it's:
text:
2020-01-11 03:54:56.364 T:775 DEBUG: Mysql execute: CREATE INDEX ix_actor_link_1 ON actor_link (media_type(20))
2020-01-11 03:54:57.743 T:775 DEBUG: Mysql execute: CREATE UNIQUE INDEX ix_actor_link_2 ON actor_link (actor_id, media_id, media_type, role)
2020-01-11 03:54:57.744 T:775 ERROR: SQL: [MyVideos118] Undefined MySQL error: Code (1170)
Query: CREATE UNIQUE INDEX ix_actor_link_2 ON actor_link (actor_id, media_id, media_type, role)
2020-01-11 03:54:57.745 T:775 ERROR: Exception updating database MyVideos118 from version 116 to 118
2020-01-11 03:54:57.745 T:775 ERROR: Error updating database MyVideos118 from version 116 to 118
2020-01-11 03:54:57.746 T:775 DEBUG: Mysql rollback transaction
The full error for this query appears to be:
text:
Error Code: 1170. BLOB/TEXT column 'media_type' used in key specification without a key length
Specifying a key length on
media_type
then results in a similar failure for role
.The following appears to work:
however 255 is just a random maximum number - something lower might make more sense, or use a non-text datatype for both columns (I've no idea how these columns are used etc.).text:
CREATE UNIQUE INDEX ix_actor_link_2 ON actor_link (actor_id, media_id, media_type(255), role(255))