Change type column of object_relations_* tables to enum

What was the issue? 

In tables where relations are stored, column ‘type’ that represents the type of the object that is in relation was set to varchar(50). The problem wasn’t severe because pimcore handles the changes in that column but it was possible to change that value directly in the database and put something that is not supported by Pimcore.

How did you solve it? 

Type of column ‘type’ is changed from varchar(50) to enum('object', 'asset', 'document') limiting values in that field to that that Pimcore can work with.

Why is this fix important?

It helps in keeping database integrity and also lowers the chance of having a bad value in that field.

Which Pimcore learning materials would you recommend to your colleagues?

Our blog posts on Pimcore and how-to guides of course. Also, official Pimcore documentation and their demo project are a great way to start. There is a lot of examples in it and you'll find out exactly how the platform works.

And if you want to check out this pull request, just follow the link! 

Looking for Exponential Growth? Let’s Get Started.
Explore next

Pimcore guides & How to

Collection of latest concepts, viewpoints and examples from the Pimcore word written by Pimcore industry experts.

Discover more