lundi 13 novembre 2017

Problems with migrations in Laravel 5.5

Something really weird is going on with my Laravel setup. I create some migration files and, when running php artisan migrate after creating each of them, they were successfully run and the tables were created in the database. Now, if I want to run php artisan migrate:refresh --seed, it cannot rollback one of the migrations because it says that migration file doesn't exist. This is the error: It says the migration was not found And this is my migration file: The file exists!

<?php

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

class CreateAssessmentsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('assessments', function (Blueprint $table) {
            $table->increments('id');
            //TODO - Complete information for this table
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('assessments');
    }
}

What's even weirder is that I had to re-create all migrations because it was randomly not creating some of the tables listed on the migrations.

Did anyone face this issue before? Any help is really appreciated.



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2zBqgKM
via IFTTT

Aucun commentaire:

Enregistrer un commentaire