mercredi 5 octobre 2016

Laravel : [PDOException] SQLSTATE[42S02]: Base table or view not found

I'm trying to build a laravel application where I have already create all the migration file. But when I tried to run the

php artisan migrate

command, I saw the following Error :

[Illuminate\Database\QueryException]
  SQLSTATE[42S02]: Base table or view not found: 1146 Table 'atom.users' does
  n't exist (SQL: select exists(select * from `users`) as `exists`)

  [PDOException]
  SQLSTATE[42S02]: Base table or view not found: 1146 Table 'atom.users' does
  n't exist

I tried to update the composer and migrate:rollback But same Error I'm getting.I couldn't find what's the Error, if any one could help me to find the problem ..Thank you.

Here is my user table migration file :

<?php

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

class CreateUsersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('users', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name');
            $table->string('email')->unique();
            $table->string('password');
            $table->rememberToken();
            $table->timestamps();
        });
    }

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



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire