You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When doing doctrine:migration:diff I get something like this:
/**
* @param Schema $schema
*
* @throws MigrationException|DBALException
*/
public function up(Schema $schema): void
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('ALTER TABLE asv_contract_operation CHANGE eligible_for_voucher eligible_for_bonus TINYINT(1) DEFAULT \'0\' NOT NULL');
}
But when doing doctrine:migration:generate I get:
/**
* @param Schema $schema
*
* @throws MigrationException|DBALException
*/
public function up(Schema $schema): void
{
}
I would expect to get:
/**
* @param Schema $schema
*
* @throws MigrationException|DBALException
*/
public function up(Schema $schema): void
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
}
The text was updated successfully, but these errors were encountered:
In addition to the above, the reason the abortIf call is there because the auto-generated migration (which is done using diff) can only support the current platform. When calling the generate command, all you get is an empty migration with no database-specific code in it. If you add code that only works on a specific platform, it's your responsibility to do so.
This doesn't mean we won't add the call ever, I'm just explaining why it isn't added at the moment.
Feature Request
Summary
When doing
doctrine:migration:diff
I get something like this:But when doing
doctrine:migration:generate
I get:I would expect to get:
The text was updated successfully, but these errors were encountered: