mercredi 30 mars 2016

Change column type using laravel migration using Doctrine DBAL gives error

I use Laravel 5.2, Php7, Apache, Windows

my migration file is "2016_03_30_095234_alter_date_update_news_table.php"

class AddSlugUpdateNewsTable extends Migration
{
    /**
     * Run the migrations.
     * php artisan make:migration add_slug_update_news_table
     * @return void
     */
    public function up()
    {
        Schema::table('news', function (Blueprint $table) {
            $table->date('slug')->change();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('news', function (Blueprint $table) {
            $table->dateTime('slug')->change();
        });
    }
}


But after run migrate,

$\> php artisan migrate

gives me this error!

[RuntimeException] Changing columns for table "news" requires Doctrine DBAL; install "doctrine/dbal".

what do i do?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire