0
Through git I used the command below:
php bin/console doctrine:migrations:generate
I opened the file and made the change
<?php
namespace Application\Migrations;
use Doctrine\DBAL\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
/**
* Auto-generated Migration: Please modify to your needs!
*/
class Version20160715170901 extends AbstractMigration
{
/**
* @param Schema $schema
*/
public function up(Schema $schema)
{
// this up() migration is auto-generated, please modify it to your needs
$interditado = $schema->getTable('interditado');
$interditado_detalhe = $schema->getTable('interditado_detalhe');
//Alterção do tipo da coluna de varchar para text para receber criptografia
$interditado->getColumn('nome')->setType('text');
$interditado->getColumn('cpf')->setType('text');
$interditado->getColumn('nome_pai')->setType('text');
$interditado->getColumn('nome_mae')->setType('text');
$interditado_detalhe->getColumn('natureza')->setType('text');
$interditado_detalhe->getColumn('livro')->setType('text');
$interditado_detalhe->getColumn('folha')->setType('text');
$interditado_detalhe->getColumn('termo')->setType('text');
}
/**
* @param Schema $schema
*/
public function down(Schema $schema)
{
// this down() migration is auto-generated, please modify it to your needs
}
}
I checked the code below and did not make the change in the table
php bin/console doctrine:migrations:migrate --dry-run
Line 23
$interditado->getColumn('nome')->setType('text');