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 for mysql automatic column type with high field limit #13781

Merged
merged 4 commits into from
Oct 12, 2023

Conversation

i-just
Copy link
Contributor

@i-just i-just commented Oct 4, 2023

Description

When using MySQL and creating a Plain Text field, if you set the Field Limit to a high value like 20,000 characters, the following error will be triggered:

SQLSTATE[42000]: Syntax error or access violation: 1074 Column length too big for column 'field_aaa_xxaevbok' (max = 21845); use BLOB or TEXT instead
The SQL being executed was: ALTER TABLE `content` ADD `field_aaa_xxaevbok` varchar(80000)

This PR keeps the current behaviour for PostgreSQL and adjusts PlainText::getContentColumnType() to account for various MySQL limits to use text, medium text and long text columns.

Related issues

support issue

@i-just i-just requested a review from brandonkelly October 4, 2023 11:14
@brandonkelly brandonkelly merged commit 1038652 into develop Oct 12, 2023
@brandonkelly brandonkelly deleted the bugfix/mysql-plaintext-auto-column-type branch October 12, 2023 22:03
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.

2 participants