janokary
1603
12
Laravel

Alter table change field to LONGTEXT;

Posted 2 years ago by janokary

Hello I tried to change

   Schema::table('table_name', function ($table) {
    $table->longText('column_name')->nullable()->change();
  });

but It didn't work so I changed it with tinker:

  DB::statement('ALTER TABLE tabel_name CHANGE  column_name column_name LONGTEXT;');

Is this a bug or something?

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.