Open
Description
No duplicates 🥲.
- I have searched for a similar issue in our bug tracker and didn't find any solutions.
What happened?
When generating a database migration and synchronizing it with the database, a difference is always detected with respect to the enum field. This occurs when I pass the enum values using the "VALUES" key directly in the attribute.
#[Column(type: 'enum', typecast: PaymentMethod::class, value: ['CASH', 'CREDIT', 'DEBIT'])]
protected PaymentMethod $method,
Running it twice, I have something like this:
public function up(): void
{
$this->table('payments')
->alterColumn('method', 'enum', [
'nullable' => false,
'defaultValue' => null,
'values' => ['CASH', 'CREDIT', 'DEBIT'],
])
->update();
}
public function down(): void
{
$this->table('payments')
->alterColumn('method', 'enum', [
'nullable' => false,
'defaultValue' => null,
'values' => ['CASH', 'CREDIT', 'DEBIT'],
])
->update();
}
Version
ORM 2.3.4
PHP 8.2
Metadata
Metadata
Assignees
Type
Projects
Status
Todo