This topic contains 4 replies, has 2 voices, and was last updated by adriwan_kenoby 7 years, 11 months ago.
- Topic
I always have this error when i first try migration:
[RuntimeException]
Unknown auxiliary section: _website.oro:entity-extend:migration:update-config [–dry-run] [-h|–help] [-q|–quiet] [-v|vv|vvv|–verbose] [-V|–version] [–ansi] [–no-ansi] [-n|–no-interaction] [-s|–shell] [–process-isolation] [-e|–env ENV] [–no-debug] [–jms-job-id JMS-JOB-ID] [–disabled-listeners DISABLED-LISTENERS] [–] <command>
ERROR: The command terminated with an exit code: 1.
> OroCRM\Bundle\ActivityContactBundle\Migration\ActivityContactMigration – skipped
> Oro\Bundle\ActivityListBundle\Migration\ActivityListMigration – skipped
> Oro\Bundle\EntityExtendBundle\Migration\UpdateExtendIndicesMigration – skipped
> Oro\Bundle\EntityConfigBundle\Migration\WarmUpEntityConfigCacheMigration – skipped[RuntimeException]
Failed migrations: Oro\Bundle\EntityExtendBundle\Migration\UpdateExtendConfigMigration.12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455<?phpnamespace Sinabs\MonitoringBundle\Migrations\Schema\v1_0;use Doctrine\DBAL\Schema\Schema;use Oro\Bundle\EntityExtendBundle\Migration\Extension\ExtendExtension;use Oro\Bundle\EntityExtendBundle\Migration\Extension\ExtendExtensionAwareInterface;use Oro\Bundle\EntityExtendBundle\EntityConfig\ExtendScope;use Oro\Bundle\MigrationBundle\Migration\Migration;use Oro\Bundle\MigrationBundle\Migration\QueryBag;class OroCRMAccountMigration implements Migration, ExtendExtensionAwareInterface {protected $webSites;/*** @inheritdoc*/public function setExtendExtension(ExtendExtension $extendExtension) {$this->webSites = $extendExtension;}/*** @inheritdoc*/public function up(Schema $schema, QueryBag $queries) {$webSites = $this->webSites;/** extend table orocrm_account * */$table = $schema->getTable('orocrm_account');/*** define and add our custom fields*/$webSites->addOneToManyRelation($schema,$table, // owning side table'webSites', // owning side field name'_website', // target side table['name'], // column names are used to show a title of related entity['name'], // column names are used to show detailed info about related entity['name'], // Column names are used to show related entity in a grid['extend' => ['owner' => ExtendScope::OWNER_CUSTOM]]);$webSites->addOneToManyInverseRelation($schema,$table, // owning side table'webSites', // owning side field name'_website', // target side table'account', // target side field name'name', // column name is used to show related entity['extend' => ['owner' => ExtendScope::OWNER_CUSTOM]]);}}12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394<?phpnamespace Sinabs\MonitoringBundle\Entity;use Doctrine\ORM\Mapping as ORM;use Sinabs\MonitoringBundle\Model\ExtendSonde;use Oro\Bundle\EntityConfigBundle\Metadata\Annotation\Config;use Oro\Bundle\EntityConfigBundle\Metadata\Annotation\ConfigField;/*** Sonde** @ORM\Table(name="_sonde")* @ORM\Entity(repositoryClass="Sinabs\MonitoringBundle\Entity\SondeRepository")* @Config*/class Sonde extends ExtendSonde {/*** @var integer** @ORM\Column(name="id", type="integer")* @ORM\Id* @ORM\GeneratedValue(strategy="AUTO")*/private $id;/*** @var string** @ORM\Column(name="url", type="string", length=255)*/private $url;/*** @ORM\ManyToOne(targetEntity="Sinabs\MonitoringBundle\Entity\WebSite", inversedBy="sondes")* @ORM\JoinColumn(nullable=false)*/private $webSite;/*** Get id** @return integer*/public function getId() {return $this->id;}/*** Set url** @param string $url** @return Sonde*/public function setUrl($url) {$this->url = $url;return $this;}/*** Get url** @return string*/public function getUrl() {return $this->url;}/*** Set webSite** @param \Sinabs\MonitoringBundle\Entity\WebSite $webSite** @return Sonde*/public function setWebSite(\Sinabs\MonitoringBundle\Entity\WebSite $webSite) {$this->webSite = $webSite;return $this;}/*** Get webSite** @return \Sinabs\MonitoringBundle\Entity\WebSite*/public function getWebSite() {return $this->webSite;}}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139<?phpnamespace Sinabs\MonitoringBundle\Entity;use Doctrine\ORM\Mapping as ORM;use Sinabs\MonitoringBundle\Model\ExtendWebSite;use Oro\Bundle\EntityConfigBundle\Metadata\Annotation\Config;use Oro\Bundle\EntityConfigBundle\Metadata\Annotation\ConfigField;/*** WebSite** @ORM\Table(name="_website")* @ORM\Entity(repositoryClass="Sinabs\MonitoringBundle\Entity\WebSiteRepository")* @Config*/class WebSite extends ExtendWebSite {/*** @var integer** @ORM\Column(name="id", type="integer")* @ORM\Id* @ORM\GeneratedValue(strategy="AUTO")*/private $id;/*** @var string** @ORM\Column(name="name", type="string", length=255)*/private $name;/*** @var string** @ORM\Column(name="url", type="string", length=255)*/private $url;/*** @ORM\OneToMany(targetEntity="Sinabs\MonitoringBundle\Entity\Sonde", mappedBy="webSite", cascade={"persist", "remove"})*/private $sondes;/*** Constructor*/public function __construct() {parent::__construct();$this->sondes = new \Doctrine\Common\Collections\ArrayCollection();}/*** Get id** @return integer*/public function getId() {return $this->id;}/*** Set name** @param string $name** @return WebSite*/public function setName($name) {$this->name = $name;return $this;}/*** Get name** @return string*/public function getName() {return $this->name;}/*** Set url** @param string $url** @return WebSite*/public function setUrl($url) {$this->url = $url;return $this;}/*** Get url** @return string*/public function getUrl() {return $this->url;}/*** Add sonde** @param \Sinabs\MonitoringBundle\Entity\Sonde $sonde** @return WebSite*/public function addSonde(\Sinabs\MonitoringBundle\Entity\Sonde $sonde) {$this->sondes[] = $sonde;return $this;}/*** Remove sonde** @param \Sinabs\MonitoringBundle\Entity\Sonde $sonde*/public function removeSonde(\Sinabs\MonitoringBundle\Entity\Sonde $sonde) {$this->sondes->removeElement($sonde);}/*** Get sondes** @return \Doctrine\Common\Collections\Collection*/public function getSondes() {return $this->sondes;}}
The forum ‘OroCRM – Programming Questions’ is closed to new topics and replies.