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

Support mysql unique index column name NULL #11696

Open
emrebas1 opened this issue Oct 25, 2024 · 0 comments
Open

Support mysql unique index column name NULL #11696

emrebas1 opened this issue Oct 25, 2024 · 0 comments

Comments

@emrebas1
Copy link

Bug Report

Q A
Version 2.19.5

Summary

MYSQL define NULL column names for conditional unique constraint

example

when I run orm:schema-tool:update command I get the following error

Error thrown while running command "orm:schema-tool:update". Message: "Doctrine\DBAL\Schema\Index::_addColumn(): Argument #1 ($column) must be of type string, null given, called in /doctrine/dbal/src/Schema/Index.php on line 72" ["exception" => TypeError { …},"command" => "orm:schema-tool:update","message" => "Doctrine\DBAL\Schema\Index::_addColumn(): Argument #1 ($column) must be of type string, null given, called in /doctrine/dbal/src/Schema/Index.php on line 72"]

Current behavior

_addColumn method expects string

Expected behavior

it should allow null

How to reproduce

CREATE UNIQUE INDEX UNIQUE_IDX_example ON example_table (column1, (case when column2 is null then -1 else column2 end))

orm:schema-tool:update

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

No branches or pull requests

1 participant