Extending Sylius entity in plugin


#1

Hi to all! I am trying to create Sylius (v1.4.5) plugin, which adds some fields like opening hours etc. to Channel entity. I’d like to extend Sylius\Component\Core\Model\Channel with My\Channel entity, then in shop which uses this plugin extend My\Channel in App\Entity\Channel\Channel. The problem is that event if I add Channel.orm.yml and set correct Channel entity class in plugin’s resource config, Doctrine either doesn’t adds new columns in migration or throws The table with name 'sylius_channel' already exists. when running php bin/console doctrine:migrations:diff.
I was successful extending few entities before, but only in AppBundle. I am not even sure if plugin is ok for this purpose, but I’d like to have the code reusable in any of our Sylius project.

Thanks a lot for any help!