Playing around with laravel 4 and was wondering if there is a way to run migrations on different connections, so if I have as default:
'sqlsrv' => array(
'driver' => 'sqlsrv',
'host' => '192.168.1.11\SQLEXPRESS',
'database' => 'database1',
'username' => 'sa',
'password' => 'password',
'prefix' => '',
),
But I want a different migration to go here:
'sqlsrv2' => array(
'driver' => 'sqlsrv',
'host' => '192.168.1.11\SQLEXPRESS',
'database' => 'database2',
'username' => 'sa',
'password' => 'password',
'prefix' => '',
),
I have no doubt there is a way to do it, but I'm not finding it in the docs. :)
Schema::connection('foo')->create...your other option is to extend the Migration and specify it there. I agree it sucks that you can't specify the connection during the migrate command.