• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 2.0 How do I set ENUM values with addColumn?

mjda

Active member
#1
As the title says, I'm wondering how to define the ENUM values when creating the table with the schema manager?

This is what I have, but I know that won't work:

PHP:
$table->addColumn('transaction_status', 'enum');
 

jmurrayhead

Well-known member
#2
As the title says, I'm wondering how to define the ENUM values when creating the table with the schema manager?

This is what I have, but I know that won't work:

PHP:
$table->addColumn('transaction_status', 'enum');
I think you have to provide the values. Other areas in the XF source show:
PHP:
            $table->addColumn('recipient_state', 'enum')->values(['active','deleted','deleted_ignored']);