I have Entity in Symfony2:
<?php namespace Project\UserBundle\Entity; use Doctrine\ORM\Mapping as ORM; class Users { private $userId; private $test; }
I add the following line between {{userId}} and {{test}}:
/** * @var integer * * @ORM\Column(name="superbanana", type="integer", nullable=false) */ private $superbanana;
Then I launch the console:
php app/console doctrine:schema:update
He gave me the answer:
ALTER TABLE users ADD superbanana INT NOT NULL
** How can i do this? **
ALTER TABLE users ADD superbanana INT NOT NULL AFTER user_id
php mysql symfony doctrine2
lepix
source share