Categories
Et Cetera

Run Sentry’s Migration When Running Laravel’s Migration

[php]
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateSentryTables extends Migration
{

/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Artisan::call(‘migrate’, [‘–package’ => ‘cartalyst/sentry’]);
}

/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
// Not required. Laravel will use Sentry’s down function.
}

}

?>
[/php]
Thanks to Jaouad Kay for the tip (https://github.com/cartalyst/sentry/issues/252#issuecomment-43416670)