Change column default string value#20244
Draft
M393 wants to merge 5 commits intophpmyadmin:QA_5_2phpmyadmin/phpmyadmin:QA_5_2from
M393:change-column-default-string-valueM393/phpmyadmin:change-column-default-string-valueCopy head branch name to clipboard
Draft
Change column default string value#20244M393 wants to merge 5 commits intophpmyadmin:QA_5_2phpmyadmin/phpmyadmin:QA_5_2from M393:change-column-default-string-valueM393/phpmyadmin:change-column-default-string-valueCopy head branch name to clipboard
M393 wants to merge 5 commits intophpmyadmin:QA_5_2phpmyadmin/phpmyadmin:QA_5_2from
M393:change-column-default-string-valueM393/phpmyadmin:change-column-default-string-valueCopy head branch name to clipboard
Conversation
null in a switch also matches empty string. Signed-off-by: Maximilian Krög <maximilian.kroeg@geocept.com>
For text type columns the value is quoted. The unquoted value was written to the wrong property in $columnMeta. Has to be 'DefaultValue' instead of 'Default'. Signed-off-by: Maximilian Krög <maximilian.kroeg@geocept.com>
Contributor
Author
|
There is some ambiguity here with expressions and literals, probably best to add a new expression type to the select input.
There are quite a few differences between the different MySQL/MariaDB versions for this, makes it rather difficult to implement. |
Signed-off-by: Maximilian Krög <maximilian.kroeg@geocept.com>
Signed-off-by: Maximilian Krög <maximilian.kroeg@geocept.com>
Signed-off-by: Maximilian Krög <maximilian.kroeg@geocept.com>
5ae3ff2 to
f719f5e
Compare
Comment on lines
+536
to
+537
| mb_substr($columnMeta['Default'], 0, 1) === "'" && | ||
| mb_substr($columnMeta['Default'], -1) === "'" |
Contributor
There was a problem hiding this comment.
str_starts_with and ends_with
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the column editing problem from #16801.
The default value for text columns is still displayed in quotes in the table structure page.
Example table, when editing, both column Default values should be
As defined:with empty string valueThe problem with the missing default value when it is an empty string was introduces in 8929288
The problem with quotes not being removed when editing a text column is probably even older, the value was assigned to the wrong property.