SQLSTATE [42000] - 1075 = laravel

时间:2016-08-30 11:55:22

标签: laravel

问题是什么?我想创建一个表。

[PDOException]
  SQLSTATE [42000]:语法错误或访问冲突:1075表定义不正确;只能有一个自动列,必须将其定义为键

> public function up()
>             {
>                 Schema::create('partners', function (Blueprint $table) {
>                     $table->increments('id');
>                     $table->bigInteger('sursa');
>                     $table->date('changed_on');
>                     $table->date('process_date')->nullable();
>                     $table->string('nume',100);
>                     $table->string('prenume',100);
>                     $table->string('tip_partener',50)->default('PF');
>                     $table->string('email',50);
>                     $table->string('cnp',50);
>                     $table->string('mobil',50);
>                     $table->integer('tip_id',50);
>                     $table->string('id_no',50);
>                     $table->string('id_serie',50);
>                     $table->date('id_eliberat');
>                     $table->dateTime('data_expirare');
>                     $table->string('domiciliu_str',100);
>                     $table->string('domiciliu_nr_str',20);
>                     $table->string('domiciliu_bl',20);
>                     $table->string('domiciliu_sc',20);
>                     $table->string('domiciliu_ap',20);
>                     $table->string('domiciliu_et',20);
>                     $table->integer('domiciliu_oras');
>                     $table->integer('domiciliu_judet');
>                     $table->string('coresp_str',100);
>                     $table->string('coresp_nr_str',20);
>                     $table->string('coresp_bl',20);
>                     $table->string('coresp_sc',20);
>                     $table->string('coresp_ap',20);
>                     $table->string('coresp_et',20);
>                     $table->integer('coresp_oras');
>                     $table->integer('coresp_judet');
>                     $table->integer('marital_status');
>                     $table->integer('date_privind_situatia_locativa');
>                     $table->integer('alte_proprietati');
>                     $table->integer('dependents');
>                     $table->string('denumire_angajator',40);
>                     $table->integer('sector_employer');
>                     $table->integer('vechimea_totala_in_munca');
>                     $table->integer('vechimea_la_actualul_loc_de_munca');
>                     $table->integer('educatie');
>                     $table->integer('tip_venit');
>                     $table->integer('surse_venit');
>                     $table->integer('data_incasarii_venitului');
>                     $table->double('total_monthly_income',10,2);
>                     $table->integer('datorii_lunare',10,2);
>                     $table->integer('rate_lunare_la_alte_imprumuturi');
>                     $table->integer('total_monthly_expenses',18,2);
>                     $table->bigInteger('incarcat_ci');
>                     $table->integer('tip_disbursare');
>                     $table->string('cont_iban');
>                     $table->integer('vechime_cont');
>                     $table->integer('banca_client');
>                 });
>             }

0 个答案:

没有答案