mjda Well-known member Sep 12, 2017 #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');
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');
J jmurrayhead Well-known member Sep 12, 2017 #2 mjda said: 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'); Click to expand... 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']); Upvote 0 Downvote
mjda said: 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'); Click to expand... 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']);
Naz XenForo developer Staff member Sep 12, 2017 #3 PHP: $table->addColumn('transaction_status')->type('enum', ['value1', 'value2', 'value3'])->setDefault('value3'); Upvote 0 Downvote
PHP: $table->addColumn('transaction_status')->type('enum', ['value1', 'value2', 'value3'])->setDefault('value3');