-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
DB update loads schema of none Contao tables #78
Comments
|
@contao/developers Any objections? |
|
I honestly don't think the problem is in Contao, but in the fact that MySQL specific attributes are used that are not supported by Doctrine. @backbone87 you might want to exclude these tables in the application configuration (via schema filters), which should still work in the install tool |
|
Why are we not using the schema filter ourselves? |
|
because it's an application-wide setting that a bundle cannot configure 😂 |
|
Managed edition == application, isn't it? |
|
As discussed in Mumble on December 21st, we want to overwrite the schema filter in the install tool. |
|
Fixed in bc4067a and contao/core-bundle@4967d3a. |
|
This change leads to the following side effect: The Imho the installation tool should either handle all entities or we need to implement a solution like #79 and ignore others. So ironically in this use case it would be better to have no filter set at all. :-) |
|
I cannot reproduce this. The schema filter is applied to the |
|
This piece of code only filters the entries from |
|
To reproduce create a simple entity in a bundle and enable the mapping. use Doctrine\ORM\Mapping as ORM;
class SomeEntity
{
/**
* @ORM\Column(name="id", type="integer")
* @ORM\Id
*
* @var integer $id
*/
protected $id;
}doctrine:
orm:
entity_managers:
default:
mappings:
SomeBundle: ~Clear cache or open the install tool in |
|
Fixed in contao/core-bundle@d5dcabd. Needs to be backported to Contao 4.4, too. |
|
Backported in contao/core-bundle@8109786. |
installation-bundle/src/Database/Installer.php
Line 98 in 2762a4e
Here the full database schema is loaded first and non-Contao parts are dropped after.
This causes errors, when database specific column types (like MySQL's POINT) are used in non-Contao database assets, that Doctrine doesnt know about:
Doctrine's Schema asset filter option should be used, to prevent loading irrelevant Schema parts:
Though it would be probably better to use a separate connection configured via doctrine bundle config for the install tool, insteadof "hot"-changing doctrine connection configuration.
The text was updated successfully, but these errors were encountered: