LoginSignup
0
0

More than 1 year has passed since last update.

【Laravel】カラムのデータ型リスト

Posted at

カラムのデータ型リスト

データ型 説明
string 文字列
integer 整数
boolean BOOLEANカラム
detetime 日時
bigIncrements 符号なしBIGINTを使用した自動増分ID(主キー)
unsignedBigInteger 符号なしBIGINTカラム

その他の参考資料:https://readouble.com/laravel/6.x/ja/migrations.html#creating-columns

マイグレーションコマンド

コマンド 説明
php artisan migrate マイグレーション実行
php artisan migrate:status マイグレーションステータス確認
php artisan migrate:rollback 直前に実行したひとまとまりのマイグレーションをロールバック
php artisan migrate:refresh 全部ロールバックしてからマイグレーションし直す
php artisan migrate:fresh 一旦全てのテーブルを削除してマイグレーションし直す

※フレッシュコマンドはデータ削除をしてしまうため、実務では使用しない方が良い。

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