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

doctrine:migrate not possible with version 3.2.1 #72

Closed
Lemmork opened this issue Jun 2, 2020 · 4 comments · Fixed by #73
Closed

doctrine:migrate not possible with version 3.2.1 #72

Lemmork opened this issue Jun 2, 2020 · 4 comments · Fixed by #73
Assignees

Comments

@Lemmork
Copy link

Lemmork commented Jun 2, 2020

A doctrine:migrate is not possible with version 3.2.1 and will throw this error:
Exception #1 in line 41 of /var/www/html/Packages/Application/Neos.GoogleAnalytics/Migrations/Mysql/Version20141111161429.php: Notice: Undefined index: CHARACTER_SET_NAME in /var/www/html/Packages/Application/Neos.GoogleAnalytics/Migrations/Mysql/Version20141111161429.php line 41

Downgrading to 3.2.0 runs doctrine:migrate correctly.

Environment:
Neos 5.2.1
php: 7.4.6
mariadb: 10.3

@Sebobo
Copy link
Member

Sebobo commented Jun 2, 2020

I think we need a version switch for 8fd974b

Maybe you or someone else can look into it.

@DrillSergeant
Copy link
Contributor

Just for my understanding, what piece of code changes the name of the result column to uppercase after executing:
SELECT character_set_name FROM information_schema.COLUMNS WHERE table_schema IN (SELECT DATABASE()) AND table_name = '${tableName}' AND column_name = 'persistence_object_identifier'?
As I read this, the field is asked in lower case characters in the SELECT statement.

Is this something doctrine, flow or even PHP does in a certain version? Or mysql/mariadb?

@Lemmork
Copy link
Author

Lemmork commented Jun 3, 2020

What about transforming array keys to lowercase, before getting the value?

$columnCharSets = array_change_key_case($columnCharSets, CASE_LOWER); $charSet = $columnCharSets['character_set_name'];

@kdambekalns kdambekalns self-assigned this Jun 8, 2020
kdambekalns added a commit to kdambekalns/neos-googleanalytics that referenced this issue Jun 8, 2020
The column name can come out of the query used to determine the
character set as upper or lower case (see neos#70, neos#71 and neos#72.)

This uses "AS charsetname" to have a reliable key in the result.

Fixes neos#72
@DrillSergeant
Copy link
Contributor

Thanks @kdambekalns . I updated the package to 3.2.2 and it works for me, too.

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

Successfully merging a pull request may close this issue.

4 participants