How to add column after specific column in Migration

I know that to add a new column in a Migration file I can do:

                        $table = $schema->getTable('table_name');
                        $table->addColumn('column_name', 'string', [
                                'notnull' => false,
                                'length' => 128,
                                'default' => '',
                        ]);

But how can I add the new column after a specific column ?

Thank you.

After is not supported by all databases we support, so it’s not available.
Also it doesn’t really matter from a technical side.

1 Like