LoginSignup
0
0

More than 3 years have passed since last update.

[Laravel]LaravelでBLOB型のMigrationに失敗した件

Posted at

LaravelでのMigrationに失敗した件について。

LaravelでMigrationしたところ、

Method Illuminate\Database\Schema\Blueprint::blob does not exist.

とのエラーが出ました。

環境

  • windows10
  • laravel6
  • php(7.4.6)

結果

Laravelにはblog型はないとのこと。
代わりにbinary型が用意されているとのことでした。

さっそくデータ型を変更。

hoge_table.php

   public function up()
    {
        Schema::create('hoges', function (Blueprint $hoge) {
            /****省略****/
            $hoge->binary('****');
        });
    }

通りました😊

次からはきちんと確認すべきですね。。

参考

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0