mercredi 21 mars 2018

I cant create a new table in laravel 5?

Hello I tried to create a new table but i can't i try to migratet using --path no response

class CreateParkTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('park', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name');
            $table->string('Equipment');
            $table->string('link');
            $table->string('latitude');
            $table->string('longitude');
            $table->timestamps();
        });
    }

And when i try php artisan migrate or php artisan migrate:refresh My table dosent create

C:\xampp\htdocs\FinalProject>php artisan make:migration create-parked-table --create=parked
Created Migration: 2018_03_21_210934_create-parked-table

C:\xampp\htdocs\FinalProject>php artisan migrate

   Illuminate\Database\QueryException  : SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'clients' already exists (SQL: create table `clients` (`id` int unsigned not null auto_increment primary key, `name` varchar(191) not null, `link` varchar(191) not null, `Equipment` varchar(191) not null, `latitude` varchar(191) not null, `longitude` varchar(191) not null, `created_at` timestamp null, `updated_at` timestamp null) default character set utf8mb4 collate utf8mb4_unicode_ci)

  at C:\xampp\htdocs\FinalProject\vendor\laravel\framework\src\Illuminate\Database\Connection.php: 664
    660|         // If an exception occurs when attempting to run a query, we'll format the error
    661|         // message to include the bindings with SQL, which will make this exception a
    662|         // lot more helpful to the developer instead of just the database's errors.
    663|         catch (Exception $e) {
  > 664|             throw new QueryException(
    665|                 $query, $this->prepareBindings($bindings), $e
    666|             );
    667|         }

     l═          ublic function         ki═          sDoctrineAvailable     ki═          ublic function  returnli═          etDoctrineColumn
kiC:\xampp\htdocs\FinalProject\vendor\laravel\framework\src\Illuminate\Database\Connection.php : 458

  2   PDOStatement::execute()
      C:\xampp\htdocs\FinalProject\vendor\laravel\framework\src\Illuminate\Database\Connection.php : 458

  Please use the argument -v to see more details.
any idea plz i need to create another few tables

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

Aucun commentaire:

Enregistrer un commentaire