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

Fix field support for CHARACTER SET & COLLATE #39

Merged
merged 1 commit into from
Feb 8, 2023

Conversation

cfebs
Copy link
Contributor

@cfebs cfebs commented Feb 3, 2023

Fixes two problems with CHARACTER SET & COLLATE

  1. Neither CHARACTER SET or COLLATE would actually be set properly on the resulting table definitions.
  2. Both CHARACTER SET & COLLATE would be required for the CharacterColumn::getPhpCode to include it in php code generation

Changes:

  • src/Processor/CreateProcessor.php The change to getTextDefinitionColumn allows the values parsed from sql to be passed to Column generation functions.
  • src/Schema/Column/CharacterColumn.php generate each function arg individually

Added an integration test to the create table parser just for an easy add (CreateProcessor::getDefinitionColumn is private)

cc @aaronm67

@cfebs cfebs merged commit 3c6ec7c into vimeo:master Feb 8, 2023
@cfebs cfebs deleted the fix-charset-collation branch February 8, 2023 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants