$table = $schema->getTable('agent_documents');
$table->addColumn('name_r', 'string');
How to add this field not as last one, but after another one?
Doctrine2 does not support adding column in other places than at the end. If you use ORM you shouldn't care about columns order. Nevertheless you could try to run instead SQL query (example for MySQL) like this:
$this->addSql('ALTER TABLE agent_documents ADD name_r VARCHAR(255) NOT NULL AFTER desired_column_name');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With