- Affected version
- 2.1.2
I have an existing column with the schema;
I try to change this to an enum (after verifying all values are in permitted types;
And it generates the following SQL:
Code:
`column1` varchar(25) NOT NULL DEFAULT 'value1',
I try to change this to an enum (after verifying all values are in permitted types;
PHP:
$sm->alterTable('xf_sv_example', function(Alter $table)
{
$table->changeColumn('column1', 'enum')
->values(['value1', 'value2', 'value3'])
->setDefault('value1');
});
And it generates the following SQL:
SQL:
ALTER TABLE `xf_sv_example` MODIFY COLUMN `column1` ENUM(25)('value1', 'value2', 'value3') NOT NULL DEFAULT 'value1'