Laravel 4 Laravel迁移产生了异常错误
我正在尝试使用artisan创建迁移。migrations类的创建没有任何问题,我使用Laravel 4 Laravel迁移产生了异常错误,laravel-4,Laravel 4,我正在尝试使用artisan创建迁移。migrations类的创建没有任何问题,我使用Schema类构造表。当我运行它时。这一切都很好,但当我尝试回滚时,它给出了一个我不理解的错误 我的迁移类 use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class Session extends Migration { /** * Run the migrat
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');
}
}
错误消息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',消息'Class'Session'not found'在E:\Documents\Dropbox\Documents\WorkSpace\u netBeans\Laravel\u Test\vendor\Laravel\framework\src\light\Database\Migrations\Migrator.php:297
您的
会话
迁移类可能与Laravel的会话
(Facade)冲突,请将其重命名为test
我刚刚在这里创建了一个:
php artisan migrate:make Session
它在尝试回滚时发生冲突:
PHP Fatal error: Call to undefined method Illuminate\Support\Facades\Session::down() in
我会保存数据,然后删除数据库,然后运行migrate:install,然后尝试migrante:refresh。它对我有效,但不确定为什么。