1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Laravelのマイグレーションの注意点

Posted at

マイグレーション

この記事に色々載っています。
下の資料は最新版です。

$table->integer('folder_id'); //integrは数字の設定ができない
$table->integer('folder_id',1); //これはだめ


$table->date('due_date')->default(now());//defaultで1指定はできない 
$table->date('due_date')->default(1);//defaultで数字で指定はできない 

$table->timestamp('email_verified_at')->nullable(); //入るかわからない場合はnullableを使う
$table->string('remember_token',255)->nullable();

マイグレーションを使う時気をつけてください。

参考資料

1
1
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
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?