Proper migration path to add a unique token column in existing entity for symfony2/doctrine
<p>I would like to add a new unique token column to an existing customer entity.</p>

<p>I know I need to change the customer class, update the schema, create unique token for each customer.</p>

<p>This is easy in dev as I just wipe the data from the database and start new. But I can't do this on the production database. </p>

<p>So, What is the proper or appropriate method to make this change?</p>

<p>Here are my changes to Customer.php:</p>

<pre><code>/**
 * Customer
 *
 * @ORM\Table()
 * @ORM\Entity(repositoryClass="AppBundle\Entity\CustomerRepository")
 * @UniqueEntity("urlToken")
 */
class Customer
{

...

/**
 * @var string
 *
 * @ORM\Column(name="urlToken", type="string", unique=true)
 */
private $urlToken;
</code></pre>