mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
error when table namespace (schema) contains a hyphen (-) #4932
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kolesar-andras on GitHub (Dec 11, 2015).
Originally assigned to: @Ocramius on GitHub.
I build Laravel project, test environment had schema was named "web-test" in postgresql. I have set database search_path to "web-test", everything worked in Laravel except changing column definitions. Migration code contains this line:
Migration gives error:
There is a column named notes in the table. I have checked Doctrine\DBAL\Schema\Table why does it throw Doctrine\DBAL\Schema\SchemaException. Dumped $_columns property in method hasColumn but it was an empty array.
I have changed schema name to "webtest" and renaming column worked.
@Ocramius commented on GitHub (Dec 11, 2015):
I don't see
web-testin any of the examples above.A few questions:
@kolesar-andras commented on GitHub (Dec 11, 2015):
Schema name "web-test" does not appear in the code because it comes from environment variable. It is also not visible in the error messages because DBAL gets only the table name "reports" without schema.
Laravel uses only DBAL, now I found https://github.com/doctrine/dbal repository, I think this issue should be reported there. Agree?
@Ocramius commented on GitHub (Dec 11, 2015):
Yes, but we need more details on how to reproduce it outside the context of laravel.
Closing here meanwhile.
@kolesar-andras commented on GitHub (Dec 12, 2015):
I have made tests in DBAL, localized the problem, made a solution that satisfies tests and created a pull request.
@Ocramius commented on GitHub (Dec 13, 2015):
@kolesar-andras thanks!