Reputation: 506
I want modify doctrine:migrations:diff command, because when I run it, the generating code is bad, so I want edit the config file but I dont know where is it.
Example bad code:
public function up(Schema $schema)
{
// this up() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('DROP TABLE sessions');
//More sql
}
and a lot of more sql sentences, which are not modify, and appear.
Upvotes: 3
Views: 706
Reputation: 2057
You can configure doctrine/dbal to ignore the sessions table (propably because you use PdoSessionHandler to store sessions in your database).
Add the following lines in your config.yml:
doctrine:
dbal:
schema_filter: ~^(?!sessions)~
.....
Take a look a the DoctrineMigrationBundle documentation on symfony website
Upvotes: 4