Jordy Groote Jordy Groote - 4 months ago 13
SQL Question

Can anybody tell me why this migration is corrupt? laravel 5.2

enter image description here

it fails when i try to refresh it when i delete the tables by hand and run php artisan migrate it works.

this is my migration



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');
}
}

Answer

Fixed it running

composer dump-autoload