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

Remove CHARACTER keyword from column types #366

Closed
wants to merge 1 commit into from

Conversation

czoIg
Copy link
Contributor

@czoIg czoIg commented Aug 24, 2022

Fixes CREATE TABLE with

`type` varchar (255) CHARACTER SET utf8 NOT NULL

as described in #365.

Also fixes unit tests with old TestCase class.

xsist10 added a commit to xsist10/PHP-SQL-Parser that referenced this pull request Dec 2, 2023
In an attempt to fix the character set issue introduced by me in
greenlion#355

This change separates out the CHARACTER check to do a look ahead
to see if the next keyword is SET and splits the logic appropriately.

An alternative would be to look back at the constructed expression
array ($expr) to see if a ExpressionType::DATA_TYPE has already been
defined.

This is an alternative fix to the fix proposed by
greenlion#366
@xsist10
Copy link
Contributor

xsist10 commented Dec 6, 2023

Hi @czoIg.

Thanks for your merge request and the effort you made in fixing the tests.

Does #376 fix your problem? If so I'll go ahead and request that this MR gets closed and the other gets merged in.

greenlion pushed a commit that referenced this pull request Dec 18, 2023
* Confusion between CHARACTER type and CHARACTER SET

In an attempt to fix the character set issue introduced by me in
#355

This change separates out the CHARACTER check to do a look ahead
to see if the next keyword is SET and splits the logic appropriately.

An alternative would be to look back at the constructed expression
array ($expr) to see if a ExpressionType::DATA_TYPE has already been
defined.

This is an alternative fix to the fix proposed by
#366

* Updated removed PHPUnit expect function.

* Added additional tests for explicit conditions.
@greenlion
Copy link
Owner

Merged alternate MR.

@greenlion greenlion closed this Dec 18, 2023
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 this pull request may close these issues.

None yet

3 participants