为什么这次迁移会被破坏? laravel 5.2

时间:2016-07-08 12:24:42

标签: php sql laravel-5 migration

enter image description here

当我手动删除表并尝试运行php artisan migrate时,我尝试刷新它时失败了。

这是我的迁移

<?php

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

class CreateImagesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('images', function(Blueprint $table)
        {
            $table->increments('id');
            $table->string('file');
            $table->string('caption');
            $table->text('description');
            $table->integer('albumid')->unsigned();
            $table->foreign('albumid')->references('id')->on('album');
            $table->timestamps();
        });
    }

    public function down()
    {
        Schema::drop('images');
    }
}

1 个答案:

答案 0 :(得分:0)

修正了它的运行

composer dump-autoload