-
-
Notifications
You must be signed in to change notification settings - Fork 395
Open
Description
BC Break Report
| Q | A |
|---|---|
| BC Break | yes |
| Version | 3.9.1 |
(ORM: 3.5.0, DBAL: 4.2.4)
Summary
Traits are now appended to the end of the generated SQL in CREATE TABLE instead of where they actually belong when running migrations:diff
Given the following setup:
trait IdentifiableEntity
{
#[ORM\Id]
#[ORM\Column(type: Types::INTEGER)]
#[ORM\GeneratedValue]
private int $id;
public function getId(): int
{
return $this->id;
}
}
class MyEntity
{
use IdentifiableEntity;
#[ORM\Column(length: 255)]
public string $name;
}Previous behavior
It generated:
$this->addSql('CREATE TABLE my_entity (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci`');Current behavior
Now it generates:
$this->addSql('CREATE TABLE my_entity (name VARCHAR(255) NOT NULL, id INT AUTO_INCREMENT NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci`');How to reproduce
Set up the class above in an empty Symfony project with orm 3.5 and dbal 4.2 installed, and run bin/console doc:mig:dif.
If you can't reproduce, I can create a small demo app.
Metadata
Metadata
Assignees
Labels
No labels