当我尝试手动删除表并运行php artisan migration时,它尝试刷新它时会失败。
这是我的迁移
<?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');
}
}
修复了它的运行
composer dump-autoload
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句