lundi 3 décembre 2018

Laravel cannot create new table field in mysql

I cannot migrate and make a new table field in phpmyadmin in my database it is giving me this error why?

my Modal name Setting

here is my modal as you can see i cant insert anything still coz i dont have my table in phpmyadmin.

    <?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Setting extends Model
{
    //
}

my Migration

here is my migration

 public function up()
{
    Schema::create('settings', function (Blueprint $table) {
        $table->increments('id');
        $table->string('settings_code');
        $table->string('subject');
        $table->text('description');
        $table->timestamps();
    });
}

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

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, client_code varchar(191) not null, client_name varchar(191) not null, address varchar(191) not null, tel_no varchar(191) not null, contact_person varchar(191) not null, mobile_no varchar(191) not null, email_ad varchar(191) not null, website varchar(191) not null, deleted_at timestamp null, created_at timestamp null, updated_at timestamp null) default character set utf8mb4 collate 'utf8mb4_unicode_ci')

I want to create new table not client table but it is giving me this error. why?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire