我已将此迁移添加到sentry包中:
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddFieldsUsers extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('users', function(Blueprint $table)
{
/* TODO unittest */
$table->string('fullname');
$table->string('username')->unique();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('users', function(Blueprint $table)
{
$table->dropColumn(array('fullname', 'username'));
});
}
}
所以当我去测试时,我需要在SQlite中只有一个用户表。 如何添加此
php artisan migrate --package = cartalyst / sentry
在我的设置中
public function setUpDb()
{
Artisan::call('migrate');
}
public function setUpDb()
{
Artisan::call('migrate', array('--package'=>'cartalyst/sentry'));
Artisan::call('migrate');
}