Class 'Permissions' 在回滚迁移中找不到 laravel 5.1
Class 'Permissions' not found in rollback migrate laravel 5.1
我已经这样迁移了
public function up()
{
Schema::create('permissions', function ($table) {
$table->increments('id');
$table->tinyInteger('value');
$table->string('name', 50);
$table->timestamps();
$table->integer('techniciansgroup_id')->nullable()->unsigned();
$table->foreign('techniciansgroup_id')->references('id')->on('techniciansgroups')->onDelete('cascade');
});
}
public function down()
{
Schema::drop('permissions');
}
当我使用这个命令时
php artisan migrate
数据库正确创建
但是当我使用回滚命令时
php artisan migrate:rollback
显示此错误
[Symfony\Component\Debug\Exception\FatalErrorException]
Class 'Permissions' not found
我删除权限迁移和删除数据库。
之后我进行权限迁移并使用 php artisan migrate
最后
php artisan migrate:rollback
工作正常。
我已经这样迁移了
public function up()
{
Schema::create('permissions', function ($table) {
$table->increments('id');
$table->tinyInteger('value');
$table->string('name', 50);
$table->timestamps();
$table->integer('techniciansgroup_id')->nullable()->unsigned();
$table->foreign('techniciansgroup_id')->references('id')->on('techniciansgroups')->onDelete('cascade');
});
}
public function down()
{
Schema::drop('permissions');
}
当我使用这个命令时
php artisan migrate
数据库正确创建
但是当我使用回滚命令时
php artisan migrate:rollback
显示此错误
[Symfony\Component\Debug\Exception\FatalErrorException]
Class 'Permissions' not found
我删除权限迁移和删除数据库。
之后我进行权限迁移并使用 php artisan migrate
最后
php artisan migrate:rollback
工作正常。