title: Syntax error or access violation: 1118 Row size too large
body: <p>I have to help some friends develop an app in Laravel (even though I didn't ever use PHP &amp; Laravel) and I've just cloned their repo.</p>
  <p>When I'm running the migration, I get this error:</p>
  <pre><code>Syntax error or access violation: 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs&quot;)
  </code></pre>
  <p>I've just searched for it on Google and people were telling that some of my fields are too big, such as varchars, but they're not (or I don't think they are)</p>
  <p>Here is my migration file:</p>
  <pre><code>&lt;?php
  
  use Illuminate\Database\Migrations\Migration;
  use Illuminate\Database\Schema\Blueprint;
  use Illuminate\Support\Facades\Schema;
  
  class CreateStudentsTable extends Migration
  {
      public function up()
      {
          Schema::create('students', function (Blueprint $table) {
              $table-&gt;bigIncrements('id');
              $table-&gt;string('nume')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('initiale')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('prenume')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;year('an_inmatriculare')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;integer('an_studiu')-&gt;nullable()-&gt;default(NULL);
  
              $table-&gt;string('data_nastere')-&gt;nullable()-&gt;default(NULL);
              //check this
              $table-&gt;integer('tip_act_identitate_id')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('cnp')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('numar_serie')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('telefon')-&gt;nullable()-&gt;default(NULL);
  
              $table-&gt;string('email')-&gt;unique()-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('password');
              $table-&gt;rememberToken();
  
              $table-&gt;string('web')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('prenume_tata')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('prenume_mama')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('nume_casatorie')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('titlu_teza')-&gt;nullable()-&gt;default(NULL);
  
  
              $table-&gt;text('comisie')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;text('adresa')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;integer('tip_cetatenie_id')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;integer('a_doua_cetatenie_id')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('sex')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;integer('tip_banca_id')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('cont_banca')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;integer('venit_pe_familie')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('alte_venituri')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('nume_liceu_absolvit')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;float('nota_bacalaureat')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;integer('localitate_domiciliu_id')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;integer('judet_domiciliu_id')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;integer('judet_nastere_id')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;integer('localitate_nastere_id')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;integer('orfan_de_un_parinte')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('numar_matricol')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('tip_act_identitate')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('numar_legitimatie')-&gt;nullable()-&gt;default(NULL);
  
              $table-&gt;string('utilizator_id')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('status')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('dmy_facultate')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('dmy_domeniu')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('dmy_grupa')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('dmy_taxa')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('dmy_anstudiu')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('dmy_anuniv')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;integer('dmy_org_unit_id_pk')-&gt;nullable()-&gt;default(NULL);
              //
              $table-&gt;integer('portal_id')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;integer('moodle_user_id')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('moodle_id_number')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('moodle_username')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;integer('user_id')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('parola_initiala')-&gt;nullable()-&gt;default(NULL);
              //
              $table-&gt;string('observatii_student')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;integer('candidat_facultate_admitere_id')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;float('medie_admitere')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('an_emitere_diploma_facultate')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('profil_liceu')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('serie_diploma_facultate')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('numar_diploma_facultate')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('forma_finantare_facultare')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('an_absolvire_master')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('durata_studii_facultate_master')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('an_emitere_diploma_master')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('program_specializare_facultate_master')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('forma_finantate_facultate_master')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('nr_ani_bugetati_master')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('strada_domiciliu')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('nr_strada_domiciliu')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('bloc_domiciliu')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('apartament_domiciliu')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('cod_postal_domiciliu')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('program_specializare_facultate')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('nr_diploma_facultate_master')-&gt;nullable()-&gt;default(NULL);
  
              $table-&gt;boolean('persoana_cu_dizabilitati')-&gt;default(0);
  
              $table-&gt;integer('tara_liceu_id')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;integer('tara_domiciliu_id')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;integer('durata_studii_facultate')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;integer('facultate_absolvita_id')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;integer('nr_ani_bugetati_licenta')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;integer('tara_facultate_master_id')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;integer('judet_facultate_master_id')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;integer('localitate_facultate_master_id')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;integer('universitate_master_id')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;integer('tara_nastere_id')-&gt;nullable()-&gt;default(NULL);
  
              $table-&gt;integer('liceu_absolvit_id')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;integer('localitate_liceu_absolvit_id')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;integer('judet_liceu_absolvit_id')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('an_absolvire_liceu')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('forma_inv_liceu_absolvit')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('act_identitate_serie')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('act_identitate_numar')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('eliberat_de')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('eliberat_data')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('etnia')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('valabilitate_pana_la')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;integer('erasmus')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;integer('localitate_populatie_mica')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;integer('urban')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;integer('rural')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;integer('maturi')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('studii_liceu_id_forma_invatamant')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('date_diploma_seria')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('numar_diploma_bac')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('date_diploma_anul')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('alte_observatii')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('date_diploma_emitent_id')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('stare_sociala_speciala_id')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;integer('judet_facultate_absolvita_id')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;integer('tara_facultate_absolvita_id')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('localitate_facultate_absolvita_id')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('forma_invatamant_facultate_absolvita')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;integer('universitate_absolvita_id')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('an_absolvire_facultate')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('situatie_medicala_speciala_id')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;integer('n_liceu_id')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;integer('date_diploma_localitate_emitent_id')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;integer('date_diploma_judet_emitent_id')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('sn_pasaport_strain')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('denumire_liceu_absolvit_strain')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('specializare_liceu_absolvit_strain')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('date_diploma_localitate_strainatate')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('an_sesiune_bac')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('localitate_liceu_absolvit_strain')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;integer('studii_liceu_id_n_specializare')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;integer('are_cnp')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;integer('student_strain')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('adresa_numar')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('localitate_nastere_strainatate')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('localitate_domiciliu_strainatate')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('liceu_institutie')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;string('liceu_institutie_eminenta')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;integer('candidat_olimpic')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;integer('admis')-&gt;nullable()-&gt;default(0);
              $table-&gt;integer('respins')-&gt;nullable()-&gt;default(0);
              $table-&gt;integer('conducator_doctorat_id')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;integer('limba_id')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;integer('nationalitate_id')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;integer('forma_invatamant_id')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;integer('forma_admitere_id')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;integer('etnia_id')-&gt;nullable()-&gt;default(NULL);
              $table-&gt;integer('localitate_facultate_id')-&gt;nullable()-&gt;default(NULL);
  
              $table-&gt;string('nota_disertatie')-&gt;nullable()-&gt;default('0.00');
              $table-&gt;string('medie_licenta')-&gt;nullable()-&gt;default('0.00');
              $table-&gt;string('medie_ani_studiu_licenta')-&gt;nullable()-&gt;default('0.00');
              $table-&gt;string('medie_ani_studiu_master')-&gt;nullable()-&gt;default('0.00');
              $table-&gt;integer('fost_student')-&gt;nullable()-&gt;default(0);
              $table-&gt;integer('absolvent')-&gt;nullable()-&gt;default(0);
              $table-&gt;integer('student_nr_ani_bugetat')-&gt;nullable()-&gt;default(0);
              $table-&gt;integer('absolvent_nr_ani_bugetat')-&gt;nullable()-&gt;default(0);
  
              $table-&gt;timestamps();
          });
      }
  
      /**
       * Reverse the migrations.
       *
       * @return void
       */
      public function down()
      {
          Schema::dropIfExists('students');
      }
  }
  </code></pre>
  <p>And here are the errors:
  <a href="https://i.stack.imgur.com/csjFt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/csjFt.png" alt="click" /></a></p>
  <p>I'm using Laravel 7 + MySQL.</p>