elcodi / bamboo

Meet Bamboo, an e-commerce project built on top of Elcodi and Symfony. Give us a star to support our project :)
http://bamboo.elcodi.com
MIT License
198 stars 44 forks source link

override entity alter table #685

Closed youssefsimon closed 8 years ago

youssefsimon commented 8 years ago

i want to alter table value by override entity i do what is write in docs but it tell me

[Doctrine\DBAL\Schema\SchemaException]
The table with name 'bamboo.value' already exists. if you have any idea this config file elcodi_attribute: mapping: attribute:

Product entity implementing ProductInterface

        class: Elcodi\Admin\AttributeBundle\Entity\NewValue
        # Doctrine manager name
        mapping_file: '@AdminAttributeBundle/Resources/config/doctrine/Value.orm.yml'
        # Doctrine manager name
        manager: default
        # Is this entity enabled?
        enabled: true

and value.orm.yml

Elcodi\Admin\AttributeBundle\Entity\NewValue: type: entity repositoryClass: Elcodi\Component\Attribute\Repository\ValueRepository table: value fields: color: column: color type: string length: 255 nullable: false

and this NewValue.php

namespace Elcodi\Admin\AttributeBundle\Entity;

use Elcodi\Component\Attribute\Entity\Value;

use Elcodi\Component\Attribute\Entity\Interfaces\AttributeInterface; use Elcodi\Component\Attribute\Entity\Interfaces\ValueInterface; use Elcodi\Component\Core\Entity\Traits\IdentifiableTrait;

/**

}

youssefsimon commented 8 years ago

i fixed by elcodi_attribute: mapping: value:

Product entity implementing ProductInterface

        class: Elcodi\Admin\AttributeBundle\Entity\NewValue
        # Doctrine manager name
        mapping_file: '@AdminAttributeBundle/Resources/config/doctrine/Value.orm.yml'
        # Doctrine manager name
        manager: default
        # Is this entity enabled?
        enabled: true