【发布时间】:2014-05-03 11:58:40
【问题描述】:
我正在尝试使用工匠创建迁移。迁移类的创建没有任何问题,我使用Schema 类构建表。当我运行它时。它工作得很好,但是当我尝试回滚时,它给出了一个我不明白的错误。
我的迁移班
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class Session extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('Session', function(Blueprint $table){
$table->string('id', 50);
$table->string('email', 100);
$table->integer('lastActivity');
$table->primary('id');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('Session');
}
}
错误信息
[2014-03-25 14:42:16] production.ERROR: 异常 'Symfony\Component\Debug\Exception\FatalErrorException' 在 E:\Documents\Dropbox\Documents 中出现消息 'Class 'Session' not found' \WorkSpace_netBeans\Laravel_Test\vendor\laravel\framework\src\Illuminate\Database\Migrations\Migrator.php:297
【问题讨论】:
-
我会保存数据,然后删除数据库,然后运行 migrate:install 然后尝试 migration:refresh 它对我有用,但不知道为什么。
标签: laravel-4