Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table tx_dpf_domain_model_documenttype can't be created in MySQL 5.7 because 'virtual' is now reserved #110

Closed
lutzhelm opened this issue Feb 11, 2019 · 10 comments

Comments

@lutzhelm
Copy link
Contributor

lutzhelm commented Feb 11, 2019

MySQL added virtual as reserved word in version 5.7.6. In effect, the table tx_dpf_domain_model_documenttype can't be created via extension installation from this version on.

EDIT:
https://dev.mysql.com/doc/refman/5.7/en/keywords.html#keywords-5-7-detailed-V
VIRTUAL (R); added in 5.7.6 (reserved)

@albig albig removed their assignment Feb 11, 2019
@claussni
Copy link
Member

claussni commented Mar 13, 2019

Solution would be to rename the model field virtual to something expressing the fact that document types which this flag do need to have attachments. Or would quoting the key word virtual be a solution?

What do think, @haogatyp?

@haogatyp
Copy link
Collaborator

I would suggest to rename it into type_abstract.

@claussni
Copy link
Member

What happens to existing data when renaming the field?

@haogatyp
Copy link
Collaborator

The database field is also renamed. When updating the extension, the migration of the field must then be initiated via Installation Tool->Database compare (Alter Table). If this is not possible, a separate update script must be developed.

@haogatyp
Copy link
Collaborator

In the Fedora repository, the field should certainly not be renamed, so you do not have to migrate. Therefore, it might be better to change the field in TYPO3 to type_virtual. So it remains traceable in the code, regarding the interface between TYPO3 and repository.

@claussni claussni self-assigned this Mar 25, 2019
@claussni
Copy link
Member

TYPO3 database analyzer tool option does not seem to be very helpful:

ALTER TABLE tx_dpf_domain_model_documenttype CHANGE virtual zzz_deleted_virtual tinyint(1) unsigned NOT NULL default '0';

@claussni
Copy link
Member

I consider MySQL 5.7 support an enhancement. Given the necessary code changes and data migration issues it's actually not an easy fix to do.

@claussni
Copy link
Member

claussni commented Jul 2, 2019

Suggestion:

  1. Release providing an update script for running on MySQL 5.6 for moving the field.
  2. Next release removing the problematic field definition.

@claussni claussni added this to the Kitodo.Publication 4.x milestone Jan 10, 2020
@claussni
Copy link
Member

@haogatyp Can we address this issue now for 4.x and later provide migration for 3.x branches?

@haogatyp
Copy link
Collaborator

Yes, this should be possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants